joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49916c
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 0x499209
push ebx
push esi
call fcn.00499135
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.0049791d
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4991b6
push esi
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x499208
push edi
push eax
call fcn.004954f0
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4991d6
call fcn.004954a0
pop ecx
push esi
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x499207
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0049791d
add esp, 0x20
test eax, eax
jne 0x4991f5
push edi
call fcn.004954a0
jmp 0x4991fd
push ebx
call fcn.004954a0
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 0x49920c
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49921d
pop esi
ret
push ebx
push edi
push esi
call fcn.00499135
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004954f0
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x499245
push ebx
push esi
push edi
call fcn.00479710
add esp, 0xc
push 0
call fcn.004954a0
pop ecx
push esi
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x499614
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0049925a

Function at 0x49c1bc
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.004952c0
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.DLL_GetLocaleInfoW]
test eax, eax
je 0x49c22b
cmp esi, dword [ebp - 4]
je 0x49c226
cmp dword [ebp + 0xc], 0
je 0x49c226
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x49c203
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0049bd11
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x49c22d
xor eax, eax
inc eax
jmp 0x49c22d
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x49c298
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4c9100]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.004952c0
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.004952c0
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x49c30f
cmp word [ecx], dx
je 0x49c30f
mov eax, dword [0x4bb784]
push edi
dec eax
push eax
push 0x4bb670
call fcn.0049c231
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x49c382
cmp word [eax], dx
je 0x49c382
mov eax, dword [edi]
test eax, eax
je 0x49c333
cmp word [eax], dx
je 0x49c333
lea eax, [ebp - 0x10]
push eax
call fcn.0049bc17
jmp 0x49c33c
lea eax, [ebp - 0x10]
push eax
call fcn.0049bcb2
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x49c3ac
mov eax, dword [0x4bb66c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x4bb360
call fcn.0049c231
add esp, 0xc
test al, al
je 0x49c3ac
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x49c377
cmp word [eax], di
je 0x49c377
lea eax, [ebp - 0x10]
push eax
call fcn.0049bc17
pop ecx
jmp 0x49c3ae
lea eax, [ebp - 0x10]
push eax
call fcn.0049bcb2
jmp 0x49c374
mov eax, dword [edi]
test eax, eax
je 0x49c399
cmp word [eax], dx
je 0x49c399
lea eax, [ebp - 0x10]
push eax
call fcn.0049bbcc
pop ecx
jmp 0x49c3ac
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.DLL_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x49c477
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0049c0b6
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x49c477
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.DLL_IsValidCodePage]
test eax, eax
je 0x49c477
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_IsValidLocale]
test eax, eax
je 0x49c477
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x49c404
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.0049740b
test ebx, ebx
je 0x49c472
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.0049740b
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_GetLocaleInfoW]
test eax, eax
je 0x49c477
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_GetLocaleInfoW]
test eax, eax
je 0x49c477
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.004a2093
add esp, 0x10
xor eax, eax
inc eax
jmp 0x49c479
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004615cd
leave
ret
Function at 0x4a3860
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4a388d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4a388d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
push 4
nop
nop
pop edi
nop
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x430072
nop
nop
mov ebx, 0x408f6c
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
mov esi, 0x788161fe
nop
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x430060
mov eax, section..data
nop
cmp eax, 0
nop
nop
nop
nop
nop
nop
je 0x4300d2
nop
mov ebx, 0x42e3d0
nop
nop
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0xe1a56c1
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x4300c0
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x401219
Function at 0x1001a6a
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push edi
push 1
push 0x30
push dword [ebp + 0xc]
call fcn.01001a25
mov esi, eax
test esi, esi
je 0x1001aba
cmp word [esi], 0
je 0x1001aba
push 0
dec esi
push 0x20
dec esi
push esi
call fcn.01001a25
push dword [ebp + 8]
mov edi, eax
sub eax, esi
push 0x100112c
sar eax, 1
push eax
push esi
call fcn.01002081
add esp, 0x10
cmp eax, 1
jne 0x1001aba
mov eax, edi
pop edi
pop esi
pop ebp
ret 8
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x1001b4b
Capabilities:
Accept command line arguments
Create thread
Terminate process

Disassembly:
push 0x40
push 0x1001138
call fcn.010020bc
mov eax, dword [0x1008034]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x44], 8
mov dword [ebp - 0x48], 0x401
mov ebx, 0x100111c
mov esi, ebx
lea edi, [ebp - 0x3c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, ebx
lea edi, [ebp - 0x2c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x4c], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, eax
push 0x8003
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 1
push 0x2f
push esi
call fcn.01001a25
mov esi, eax
cmp esi, edi
je 0x1001cd5
mov ax, word [esi]
cmp ax, di
je 0x1001cd5
movzx eax, ax
cmp eax, 0x43
je 0x1001bfb
cmp eax, 0x49
je 0x1001bf6
cmp eax, 0x4d
je 0x1001bf2
cmp eax, 0x53
je 0x1001bee
cmp eax, 0x58
jne 0x1001cd5
add esi, 2
push esi
lea eax, [ebp - 0x48]
push eax
call fcn.01001a6a
jmp 0x1001c08
or dword [ebp - 0x44], 2
inc esi
inc esi
jmp 0x1001c0a
lea eax, [ebp - 0x2c]
jmp 0x1001bfe
lea eax, [ebp - 0x3c]
add esi, 2
push esi
push eax
call fcn.01001ac8
mov esi, eax
cmp esi, edi
je 0x1001c13
cmp word [esi], di
jne 0x1001b9f
push dword [ebp - 0x44]
push edi
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jge 0x1001c28
push 2
jmp 0x1001cd7
mov dword [ebp - 4], edi
push edi
push edi
push edi
push 0x1001b29
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x50], eax
cmp eax, edi
jne 0x1001c4a
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x1001c21
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x48]
push edi
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x1001c69
cmp dword [ebp - 0x40], edi
jne 0x1001c78
push 3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
lea edx, [ebp - 0x4c]
push edx
push ebx
push eax
call dword [ecx]
test eax, eax
jl 0x1001c98
push 3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x1001cbf
or dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x1c]
call fcn.01001d56
call fcn.010020f7
ret 0x10
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x1001e9d
Capabilities:
Parse pe header

Disassembly:
push 0x60
push 0x1001148
call fcn.010020bc
mov edi, 0x94
mov eax, edi
call fcn.01002f10
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x10085b8], ecx
mov eax, dword [esi + 4]
mov dword [0x10085c4], eax
mov edx, dword [esi + 8]
mov dword [0x10085c8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x10085bc], esi
cmp ecx, 2
je 0x1001efd
or esi, 0x8000
mov dword [0x10085bc], esi
shl eax, 8
add eax, edx
mov dword [0x10085c0], eax
cmp word [0x1000000], 0x5a4d
jne 0x1001f3a
mov eax, dword [0x100003c]
cmp dword [eax + 0x1000000], 0x4550
jne 0x1001f3a
movzx ecx, word [eax + 0x1000018]
cmp ecx, 0x10b
je 0x1001f53
cmp ecx, 0x20b
je 0x1001f40
and dword [ebp - 0x1c], 0
jmp 0x1001f6a
cmp dword [eax + 0x1000084], 0xe
jbe 0x1001f3a
xor ecx, ecx
cmp dword [eax + 0x10000f8], ecx
jmp 0x1001f64
cmp dword [eax + 0x1000074], 0xe
jbe 0x1001f3a
xor ecx, ecx
cmp dword [eax + 0x10000e8], ecx
setne cl
mov dword [ebp - 0x1c], ecx
push 0
call fcn.01002eb0
pop ecx
test eax, eax
jne 0x1001f97
cmp dword [0x10085a8], 1
jne 0x1001f84
call fcn.010025a4
push 0x1c
call fcn.010023b7
push 0xff
call fcn.01002216
pop ecx
pop ecx
and dword [ebp - 4], 0
call fcn.01002ce0
test eax, eax
jge 0x1001fac
push 0x1b
call fcn.01001e6e
pop ecx
call fcn.01002c30
mov dword [0x1009a10], eax
call fcn.01002a91
mov dword [0x10085a4], eax
call fcn.010029f4
test eax, eax
jge 0x1001fd1
push 8
call fcn.01001e6e
pop ecx
call fcn.010027b3
test eax, eax
jge 0x1001fe2
push 9
call fcn.01001e6e
pop ecx
call fcn.01002270
mov dword [ebp - 0x28], eax
test eax, eax
je 0x1001ff5
push eax
call fcn.01001e6e
pop ecx
and dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.0100275a
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x1002017
movzx eax, word [ebp - 0x40]
jmp 0x100201a
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push 0
push 0x1000000
call fcn.01001b4b
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp dword [ebp - 0x1c], 0
jne 0x100203b
push esi
call fcn.01002350
call fcn.01002388
jmp 0x100206d
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x7c]
call fcn.010020f7
ret
Function at 0x10023b7
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x1008034]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x1008040]
je 0x10023e1
inc eax
cmp eax, 0x12
jb 0x10023d2
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x1008040]
mov dword [ebp - 0x110], esi
jne 0x100258c
mov eax, dword [0x10085a8]
cmp eax, 1
je 0x100255a
test eax, eax
jne 0x1002417
cmp dword [0x100803c], 1
je 0x100255a
cmp ecx, 0xfc
je 0x100258c
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
mov byte [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1002452
push 5
pop ecx
mov esi, 0x10014bc
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebx, [ebp - 0x10c]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100245d
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x1002495
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002475
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x10014b8
push ebx
call fcn.010043c0
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100249a
sub eax, edx
mov ecx, eax
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x1008044]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10024b4
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.01002f10
mov edx, esp
push 6
pop ecx
mov esi, 0x100149c
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10024e0
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10024ec
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1002505
mov eax, dword [ebp - 0x110]
mov esi, 0x1001498
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x1008044]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002523
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100252f
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x1001470
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.010042bb
add esp, 0xc
jmp 0x100258c
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x100258c
mov esi, dword [esi + 0x1008044]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x1002571
push 0
sub ecx, edx
lea edx, [ebp - 0x114]
push edx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x120]
mov ecx, dword [ebp - 4]
call fcn.01001d56
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1002a91
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1008814]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push edi
xor ebx, ebx
cmp eax, ebx
push 2
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
pop edi
jne 0x1002ae4
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x1002acb
mov dword [0x1008814], 1
jmp 0x1002ae9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x1002adf
mov eax, edi
mov dword [0x1008814], eax
jmp 0x1002ae4
mov eax, dword [0x1008814]
cmp eax, 1
jne 0x1002b50
cmp dword [ebp - 4], ebx
jne 0x1002afe
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x1002afe
xor eax, eax
jmp 0x1002c0f
mov ecx, dword [ebp - 4]
cmp word [ecx], bx
mov eax, ecx
je 0x1002b16
add eax, edi
cmp word [eax], bx
jne 0x1002b08
add eax, edi
cmp word [eax], bx
jne 0x1002b08
sub eax, ecx
add eax, edi
mov esi, eax
push esi
call fcn.010045ac
cmp eax, ebx
pop ecx
jne 0x1002b37
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
jmp 0x1002c0f
mov ecx, esi
mov esi, dword [ebp - 4]
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, eax
jmp 0x1002b27
cmp eax, edi
je 0x1002b58
cmp eax, ebx
jne 0x1002af7
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x1002af7
cmp byte [esi], bl
je 0x1002b9d
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x1002af7
add dword [ebp - 8], eax
mov eax, esi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1002b89
sub eax, edi
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x1002b6b
mov esi, dword [ebp - 4]
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
add eax, eax
push eax
call fcn.010045ac
cmp eax, ebx
pop ecx
mov dword [ebp - 0xc], eax
jne 0x1002bb6
push esi
jmp 0x1002c20
mov edi, esi
mov esi, eax
mov eax, dword [ebp - 4]
cmp byte [eax], bl
je 0x1002c00
mov ecx, dword [ebp - 8]
mov eax, esi
sub eax, dword [ebp - 0xc]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x1002c14
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1002be4
sub eax, edx
push esi
lea edi, [edi + eax + 1]
call fcn.010045c8
cmp byte [edi], bl
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x1002bc1
push dword [ebp - 4]
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
push dword [ebp - 0xc]
call fcn.010044c3
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x1002af7
Function at 0x1002c30
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x1008818]
test eax, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x1002c74
call esi
test eax, eax
je 0x1002c59
mov dword [0x1008818], 1
jmp 0x1002c79
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x1002c70
mov dword [0x1008818], 2
jmp 0x1002c82
xor eax, eax
jmp 0x1002cd8
cmp eax, 1
jne 0x1002c7d
call esi
jmp 0x1002cd8
cmp eax, 2
jne 0x1002c70
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push eax
push 1
push 0
mov dword [ebp - 8], eax
call esi
mov edi, eax
test edi, edi
je 0x1002cd5
lea eax, [edi + edi]
push eax
call fcn.010045ac
test eax, eax
pop ecx
mov dword [ebp - 4], eax
je 0x1002cd5
push edi
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
push 1
push 0
call esi
test eax, eax
je 0x1002ccc
mov eax, dword [ebp - 4]
jmp 0x1002cd7
push dword [ebp - 4]
call fcn.010044c3
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x100408a
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x10040bb
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x10040c2
cmp ebx, dword [ebp + 8]
jae 0x10040c2
xor eax, eax
jmp 0x10042b2
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x10040d3
xor eax, eax
inc eax
jmp 0x10042b1
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x10040e9
cmp ecx, edx
jae 0x100422e
cmp dword [eax + 4], 0
je 0x10040f2
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x10040da
cmp dword [ebp + 8], 0
je 0x1004114
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x100422e
cmp eax, esi
jae 0x100422e
mov eax, dword [0x1008820]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x1004139
cmp dword [esi*4 + 0x1008828], edi
je 0x1004232
inc esi
cmp esi, eax
jl 0x1004127
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10042ae
cmp dword [ebp - 8], 0x1000000
jne 0x10042ae
test byte [ebp - 0xc], 0xcc
je 0x10041b7
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x10042ae
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x10042ae
cmp word [eax + 0x18], 0x10b
jne 0x10042ae
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x10042ae
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x10041b7
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x10041b7
test byte [ecx + 0x27], 0x80
jne 0x100422e
push 1
push 0x1008868
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x10040cb
mov ecx, dword [0x1008820]
test ecx, ecx
mov edx, ecx
jle 0x10041eb
lea eax, [ecx*4 + 0x1008824]
cmp dword [eax], edi
je 0x10041eb
dec edx
sub eax, 4
test edx, edx
jg 0x10041df
test edx, edx
jne 0x100421c
push 0xf
pop ebx
cmp ecx, ebx
jg 0x10041f8
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x1004210
lea eax, [edx*4 + 0x1008828]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x10041fe
cmp ecx, 0x10
jge 0x100421c
inc ecx
mov dword [0x1008820], ecx
push 0
push 0x1008868
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x10040cb
xor eax, eax
jmp 0x10042b1
test esi, esi
jle 0x10040cb
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x1008868
call ebx
test eax, eax
jne 0x10040cb
cmp dword [esi*4 + 0x1008828], edi
je 0x1004288
mov eax, dword [0x1008820]
lea esi, [eax - 1]
test esi, esi
jl 0x1004276
cmp dword [esi*4 + 0x1008828], edi
je 0x1004272
dec esi
jns 0x1004266
test esi, esi
jge 0x1004286
cmp eax, 0x10
jge 0x1004281
inc eax
mov dword [0x1008820], eax
lea esi, [eax - 1]
jmp 0x1004288
je 0x10042a0
xor ecx, ecx
test esi, esi
jl 0x10042a0
lea eax, [ecx*4 + 0x1008828]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x100428e
push 0
push 0x1008868
call ebx
jmp 0x10040cb
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret