joyce8/EMBER2024-capa huggingface dataset:
Function at 0x536060
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x7df460], edx
push ebx
push esi
push edi
push ebp
jbe 0x536267
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x7df360
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x536267
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x5360c9
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x5360da
push 2
push 0
push edx
call fcn.00536290
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x536176
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x5361af
lea edi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x53613d
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x53612b
mov byte [edi], 0xd
inc esi
inc edi
mov byte [edi], al
inc edi
mov eax, edi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x536112
lea eax, [esp + 0x24]
push 0
sub edi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push edi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5361a5
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, edi
jge 0x5360fd
jmp 0x5361af
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5361a5
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x5361af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x536256
cmp dword [esp + 0x10], 0
je 0x536208
cmp dword [esp + 0x10], 5
jne 0x5361eb
mov dword [0x56b7b4], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x56b7b8], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.0053c220
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x536232
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x536232
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x56b7b4], 0x1c
mov dword [0x56b7b8], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x56b7b4], 9
mov dword [0x56b7b8], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x536990
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
xor esi, esi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x5369c6
cmp byte [esp + 5], 0x3a
jne 0x5369c6
xor eax, eax
mov al, byte [esp + 4]
push eax
call fcn.005373d0
add esp, 4
lea esi, [eax - 0x40]
mov eax, esi
pop esi
add esp, 0x104
ret

Function at 0x536b50
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
push esi
mov ebx, dword [esp + 0x118]
push edi
test ebx, ebx
je 0x536bc3
push ebx
call fcn.00536c80
add esp, 4
test eax, eax
jne 0x536b91
xor eax, eax
pop edi
mov dword [0x56b7b8], 0xf
mov dword [0x56b7b4], 0xd
pop esi
pop ebx
add esp, 0x10c
ret
add bl, 0x40
lea eax, [esp + 0x10]
mov byte [esp + 0xc], bl
push eax
lea ecx, [esp + 0x18]
lea ebx, [esp + 0x10]
mov byte [esp + 0x11], 0x3a
mov byte [esp + 0x12], 0x2e
mov byte [esp + 0x13], 0
push ecx
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x536bd3
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x536c72
inc eax
cmp eax, 0x104
ja 0x536c72
mov edx, dword [esp + 0x120]
test edx, edx
jne 0x536c24
mov ecx, dword [esp + 0x124]
cmp ecx, eax
jg 0x536bff
mov ecx, eax
push ecx
call fcn.0052f730
add esp, 4
mov edx, eax
test edx, edx
jne 0x536c43
xor eax, eax
pop edi
mov dword [0x56b7b4], 0xc
pop esi
pop ebx
add esp, 0x10c
ret
cmp dword [esp + 0x124], eax
jge 0x536c43
xor eax, eax
pop edi
mov dword [0x56b7b4], 0x22
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, edx
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret

Function at 0x536c80
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
sub esp, 4
test eax, eax
jne 0x536c94
mov eax, 1
add esp, 4
ret
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0x5c
mov byte [esp + 3], 0
add al, 0x40
mov byte [esp], al
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x536cc6
cmp eax, 1
je 0x536cc6
mov eax, 1
add esp, 4
ret
xor eax, eax
add esp, 4
ret
Function at 0x5377c0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x56b7fc], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x5377de
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x56b7f8], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x56b7f4], bl
jne 0x537838
cmp dword [0x7e047c], 0
je 0x537826
mov edi, dword [0x7e0478]
sub edi, 4
cmp edi, dword [0x7e047c]
jb 0x537826
mov eax, dword [edi]
test eax, eax
je 0x53781b
call eax
sub edi, 4
cmp edi, dword [0x7e047c]
jae 0x537813
push 0x55f040
push 0x55f038
call fcn.00537870
add esp, 8
push 0x55f048
push 0x55f044
call fcn.00537870
add esp, 8
test ebx, ebx
jne 0x53785f
mov dword [0x56b7fc], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret

Function at 0x538820
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x556258
push 0x538a10
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x56b7c0], eax
xor eax, eax
mov al, byte [0x56b7c1]
mov dword [0x56b7cc], eax
mov eax, dword [0x56b7c0]
shr dword [0x56b7c0], 0x10
and eax, 0xff
mov dword [0x56b7c8], eax
shl eax, 8
add eax, dword [0x56b7cc]
mov dword [0x56b7c4], eax
call fcn.0053e8e0
test eax, eax
jne 0x538894
push 0x1c
call fcn.005389c0
add esp, 4
mov dword [ebp - 4], 0
call fcn.0053c990
call fcn.0053d120
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x7e0474], eax
call fcn.0053e750
mov dword [0x56b800], eax
test eax, eax
je 0x5388c7
cmp dword [0x7e0474], 0
jne 0x5388d1
push 0xffffffffffffffff
call fcn.00537780
add esp, 4
call fcn.0053e4d0
call fcn.0053e3e0
call fcn.00537750
mov esi, dword [0x7e0474]
mov al, byte [esi]
cmp al, 0x22
je 0x5388f8
cmp al, 0x20
jbe 0x538925
inc esi
cmp byte [esi], 0x20
ja 0x5388f0
jmp 0x538925
inc esi
cmp byte [esi], 0x22
je 0x538924
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x53891f
xor eax, eax
mov al, bl
push eax
call fcn.0053e380
add esp, 4
test eax, eax
je 0x538919
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x538901
cmp byte [esi], 0x22
jne 0x538925
inc esi
cmp byte [esi], 0
je 0x538935
cmp byte [esi], 0x20
ja 0x538935
inc esi
cmp byte [esi], 0
jne 0x53892a
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x538959
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.00537780
jmp 0x53899a
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x53cb70
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.00536770
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1014]
push ebp
cmp dword [0x7df460], esi
jbe 0x53ccbd
mov eax, esi
mov ecx, esi
and eax, 0xffffffe7
and ecx, 0x1f
sar eax, 3
mov edx, dword [eax + 0x7df360]
test byte [edx + ecx*8 + 4], 1
je 0x53ccbd
push 1
push ebx
push esi
call fcn.00536290
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x53ccad
push 2
push ebx
push esi
call fcn.00536290
add esp, 0xc
cmp eax, 0xffffffff
je 0x53ccad
mov ecx, dword [esp + 0x101c]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x53cc53
lea edi, [esp + 0x14]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.0053fc60
add esp, 8
mov edi, eax
mov eax, 0x1000
cmp ebp, eax
jge 0x53cc16
mov eax, ebp
push eax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.00536060
add esp, 0xc
cmp eax, 0xffffffff
je 0x53cc32
sub ebp, eax
test ebp, ebp
jg 0x53cc0b
jmp 0x53cc47
cmp dword [0x56b7b8], 5
jne 0x53cc45
mov dword [0x56b7b4], 0xd
mov ebx, eax
push edi
push esi
call fcn.0053fc60
add esp, 8
jmp 0x53cc90
jge 0x53cc90
push 0
push ecx
push esi
call fcn.00536290
add esp, 0xc
push esi
call fcn.0053c940
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x53cc90
mov dword [0x56b7b4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x56b7b8], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.00536290
add esp, 0xc
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x56b7b4], 9
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
Function at 0x53e750
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x56c3f8], ebx
jne 0x53e79f
call esi
cmp eax, ebx
mov edi, eax
je 0x53e77d
mov dword [0x56c3f8], 1
jmp 0x53e79f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x53e795
mov dword [0x56c3f8], 2
jmp 0x53e79f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x56c3f8], 1
jne 0x53e84e
test edi, edi
jne 0x53e7c2
call esi
mov edi, eax
test edi, edi
jne 0x53e7c2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x53e7dc
add esi, 2
cmp word [esi], 0
jne 0x53e7ca
add esi, 2
cmp word [esi], 0
jne 0x53e7ca
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x53e83d
push ebp
call fcn.0052f730
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x53e83d
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x53e82c
push ebx
call fcn.0052f860
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x56c3f8], 2
jne 0x53e8d2
test ebx, ebx
jne 0x53e871
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x53e871
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x53e886
inc ebp
cmp byte [ebp], 0
jne 0x53e878
inc ebp
cmp byte [ebp], 0
jne 0x53e878
sub ebp, ebx
inc ebp
push ebp
call fcn.0052f730
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x53e8ab
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x53e960
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x56c400
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x53e987
add eax, 8
inc ecx
cmp eax, 0x56c490
jb 0x53e978
cmp dword [ecx*8 + 0x56c400], edx
lea ebx, [ecx*8]
jne 0x53eb4b
cmp dword [0x56b80c], 1
je 0x53eb07
cmp dword [0x56b80c], 0
jne 0x53e9be
cmp dword [0x56b810], 1
je 0x53eb07
cmp edx, 0xfc
je 0x53eb4b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x53e9fb
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x53ea3f
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x55678c
push ebp
call fcn.00535310
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x561590
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x56c404]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00540980
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x7df360], 0
je 0x53eb1d
mov eax, dword [0x7df360]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x53eb27
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x56c404]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x5416f0
Capabilities:
Set environment variable

Disassembly:
sub esp, 4
cmp dword [esp + 8], 0
push ebx
push esi
push edi
push ebp
je 0x54192e
mov edx, dword [esp + 0x18]
push 0x3d
push edx
call fcn.00537890
add esp, 8
mov ebp, eax
test ebp, ebp
je 0x54192e
cmp ebp, dword [esp + 0x18]
je 0x54192e
cmp byte [ebp + 1], 1
sbb eax, eax
mov ecx, dword [0x56b7dc]
neg eax
mov dword [esp + 0x10], eax
cmp dword [0x56b7e0], ecx
jne 0x54174d
push ecx
call fcn.005419a0
add esp, 4
mov dword [0x56b7dc], eax
cmp dword [0x56b7dc], 0
jne 0x5417fd
cmp dword [esp + 0x1c], 0
je 0x541784
cmp dword [0x56b7e4], 0
je 0x541784
call fcn.00541340
test eax, eax
je 0x5417fd
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [esp + 0x10], 0
je 0x541795
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x56b7dc], 0
jne 0x5417c9
push 4
call fcn.0052f730
add esp, 4
mov dword [0x56b7dc], eax
test eax, eax
jne 0x5417be
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [0x56b7dc]
mov dword [eax], 0
cmp dword [0x56b7e4], 0
jne 0x5417fd
push 4
call fcn.0052f730
add esp, 4
mov dword [0x56b7e4], eax
test eax, eax
jne 0x5417f2
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [0x56b7e4]
mov dword [eax], 0
mov esi, dword [0x56b7dc]
sub ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x18]
push ebp
push edx
call fcn.00541940
add esp, 8
mov edi, eax
test edi, edi
jl 0x541865
cmp dword [esi], 0
je 0x541865
cmp dword [esp + 0x10], 0
je 0x54185c
lea ebx, [esi + edi*4]
mov eax, dword [ebx]
push eax
call fcn.0052f860
add esp, 4
cmp dword [ebx], 0
je 0x541849
mov eax, dword [ebx + 4]
add ebx, 4
inc edi
mov dword [ebx - 4], eax
cmp dword [ebx], 0
jne 0x54183a
shl edi, 2
push edi
push esi
call fcn.0052f800
add esp, 8
test eax, eax
je 0x5418ad
jmp 0x5418a8
mov edx, dword [esp + 0x18]
mov dword [esi + edi*4], edx
jmp 0x5418ad
cmp dword [esp + 0x10], 0
jne 0x541924
test edi, edi
jge 0x541876
neg edi
lea eax, [edi*4 + 8]
push eax
push esi
call fcn.0052f800
add esp, 8
test eax, eax
jne 0x541898
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
lea ecx, [eax + edi*4]
mov edx, dword [esp + 0x18]
mov dword [ecx], edx
mov dword [ecx + 4], 0
mov dword [0x56b7dc], eax
cmp dword [esp + 0x1c], 0
je 0x54191a
mov edi, dword [esp + 0x18]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.0052f730
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x54191a
mov edi, dword [esp + 0x18]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x10], 1
sbb eax, eax
lea ecx, [ebp + ebx]
mov byte [ecx], 0
lea ecx, [ecx + 1]
and eax, ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.0052f860
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x414ac0
Capabilities:
Encode data using xor

Disassembly:
push ecx
sbb dl, byte [ebp + 0x21430109]
mov es, word [edx + edx*4]
sbb byte [edi], bl
invalid
Function at 0x4049fc
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x404a3b
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x404a3b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404a3b
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x404a3b
cmp dword [ecx + 0x74], 0xe
jbe 0x404a3b
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x407433
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x4074d0
push ebx
push esi
call fcn.004073fc
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00407390
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40747d
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4074cf
push edi
push eax
call fcn.00408050
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40749d
call fcn.00405ef1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4074ce
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00407390
add esp, 0x20
test eax, eax
jne 0x4074bc
push edi
call fcn.00405ef1
jmp 0x4074c4
push ebx
call fcn.00405ef1
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x4087cd
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x410fd8
push 0x410fd0
push str.FlsAlloc
push 0x1f
call fcn.0040868c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x408801
push dword [ebp + 8]
mov ecx, esi
call dword [0x40f120]
call esi
jmp 0x408807
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40884b
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x410fe8
push 0x410fe0
push str.FlsGetValue
push 0x21
call fcn.0040868c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x408882
push dword [ebp + 8]
mov ecx, esi
call dword [0x40f120]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40888a
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x410ff0
push 0x410fe8
push str.FlsSetValue
push 0x22
call fcn.0040868c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4088c4
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x40f120]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x100017b0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x100b5080]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
push eax
push 0x40
push 1
push esi
mov edi, ecx
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x1c], esi
call ebx
test eax, eax
setne byte [ebp - 0x10]
mov cl, byte [esi]
mov byte [ebp - 0x1d], cl
test eax, eax
je 0x10001808
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x1c]
call ebx
mov cl, byte [ebp - 0x1d]
movzx eax, cl
sub eax, 0xe8
je 0x100018da
sub eax, 1
je 0x100018da
sub eax, 0x16
jne 0x100018c1
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
push 0x40
inc esi
mov dword [ebp - 0x18], 1
push 1
push esi
mov dword [ebp - 0x1c], esi
call ebx
test eax, eax
setne byte [ebp - 0x10]
mov cl, byte [esi]
mov byte [ebp - 0x1d], cl
test eax, eax
je 0x10001866
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x1c]
call ebx
mov cl, byte [ebp - 0x1d]
cmp cl, 0x15
je 0x10001870
cmp cl, 0x25
jne 0x100018c1
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
push 0x40
add esi, 2
mov dword [ebp - 0x18], 4
push 4
push esi
mov dword [ebp - 0x1c], esi
call ebx
test eax, eax
setne byte [ebp - 0x10]
mov esi, dword [esi]
test eax, eax
je 0x100018aa
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x1c]
call ebx
mov ecx, dword [esi]
mov eax, edi
mov dword [edi], ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1004df05
mov esp, ebp
pop ebp
ret
mov dword [edi], 0
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1004df05
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
push 0x40
inc esi
mov dword [ebp - 0x18], 4
push 4
push esi
mov dword [ebp - 0x1c], esi
call ebx
test eax, eax
setne byte [ebp - 0x10]
mov ecx, dword [esi]
mov dword [ebp - 0x24], ecx
test eax, eax
je 0x10001918
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x1c]
call ebx
mov ecx, dword [ebp - 0x24]
lea eax, [esi + 4]
add eax, ecx
mov ecx, dword [ebp - 8]
mov dword [edi], eax
xor ecx, ebp
mov eax, edi
pop edi
pop esi
pop ebx
call fcn.1004df05
mov esp, ebp
pop ebp
ret