joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402c93
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
xor eax, eax
mov dword [esi + 0x10], eax
cmp dword [esi + 8], eax
je 0x402cf3
push ebx
push edi
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [ebp + 8]
mov ebx, eax
mov esi, dword [esi + 8]
mov ecx, edx
neg edx
not ecx
sbb edx, edx
lea edi, [ebx + 1]
and edx, ecx
shr edi, 1
je 0x402ce3
movzx eax, word [esi]
lea esi, [esi + 2]
add edx, eax
mov eax, edx
shr eax, 0x10
test ax, ax
je 0x402ce0
mov ecx, eax
movzx edx, dx
add edx, ecx
dec edi
jne 0x402cc7
mov ecx, edx
movzx eax, dx
shr ecx, 0x10
add ecx, ebx
pop edi
add eax, ecx
pop ebx
jmp 0x402cfc
mov dword [esi + 0x10], 1
xor eax, eax
pop esi
pop ebp
ret 4

Function at 0x402d01
Capabilities:
Parse pe header

Disassembly:
and dword [ecx + 0x10], 0
mov edx, dword [ecx + 8]
push esi
test edx, edx
je 0x402d57
mov eax, 0x5a4d
cmp word [edx], ax
jne 0x402d4e
mov eax, dword [edx + 0x3c]
add eax, edx
cmp dword [eax], 0x4550
jne 0x402d45
movzx edx, word [eax + 4]
mov esi, 0x14c
cmp dx, si
jne 0x402d3b
and dword [ecx + 0x10], 0
mov eax, dword [eax + 0x58]
pop esi
ret
mov esi, 0x8664
cmp dx, si
je 0x402d32
mov dword [ecx + 0x10], 7
jmp 0x402d5e
mov dword [ecx + 0x10], 6
jmp 0x402d5e
mov dword [ecx + 0x10], 1
xor eax, eax
pop esi
ret

Function at 0x402f7f
Capabilities:
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
push edi
xor esi, esi
mov edx, dword [eax + 4]
mov edi, dword [eax]
add edx, edx
mov eax, 0x1505
test edx, edx
jle 0x402fa7
movzx ecx, byte [esi + edi]
imul eax, eax, 0x21
add eax, ecx
inc esi
cmp esi, edx
jl 0x402f99
pop edi
pop esi
pop ebp
ret 4
Function at 0x408420
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
xor ebx, ebx
mov dword [ebp - 8], ecx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x408450
xor al, al
jmp 0x4084a9
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call fcn.00411fe0
pop ecx
push ebx
lea ecx, [ebp - 4]
mov dword [ebp + 8], eax
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
mov esi, dword [ebp + 8]
je 0x40849f
mov ecx, dword [ebp - 8]
push ebx
push str.SCRIPT
push 0xa
push dword [ebp - 4]
add ecx, 0x1750
push esi
call fcn.0040a21b
mov bl, al
push esi
call fcn.00415950
pop ecx
mov al, bl
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4097e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push 2
xor ebx, ebx
push ebx
push ecx
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
jne 0x409802
xor al, al
jmp 0x40989b
lea eax, [ebp - 4]
mov dword [0x43de10], ebx
push eax
push 0x409750
push 0xe
push esi
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
test eax, eax
jne 0x40982c
cmp dword [ebp - 4], ebx
jne 0x40982c
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4097fb
push 0xe
push 0x63
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x409823
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x409892
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
movzx ecx, word [eax + 4]
mov dword [0x43de14], ecx
test ecx, ecx
je 0x409872
lea edx, [eax + 0x12]
mov ax, word [edx]
lea edx, [edx + 0xe]
mov word [ebx*2 + 0x43de20], ax
inc ebx
cmp ebx, ecx
jb 0x40985f
cmp ecx, 0x10
jae 0x409890
mov eax, dword [0x43de10]
sub eax, ecx
inc eax
add eax, ecx
mov word [ecx*2 + 0x43de20], ax
inc ecx
inc eax
cmp ecx, 0x10
jb 0x409881
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, bl
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40bdae
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov ecx, dword [ebx]
push 2
pop edx
lea eax, [ecx + 4]
mov dword [ebx], eax
mov esi, dword [ecx + edi]
xor ecx, ecx
mov dword [ebp + 8], esi
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00412718
mov ecx, dword [ebx]
add esi, esi
add ecx, edi
mov edi, eax
push esi
push ecx
push edi
call fcn.00412770
mov ecx, dword [ebp + 8]
xor eax, eax
mov word [esi + edi], ax
add esp, 0x10
add dword [ebx], esi
test ecx, ecx
jle 0x40be09
xor word [edi + eax*2], cx
inc eax
cmp eax, ecx
jl 0x40be00
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x40d491
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ecx]
push esi
push edi
xor edi, edi
mov dword [ebp - 0xc], 0xc
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
test al, 0x10
je 0x40d4cd
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [ebp + 0x10]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x40d50a
mov dword [esi], edi
mov eax, dword [esi]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
test dword [ebp + 8], eax
je 0x40d4f3
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
test eax, eax
jne 0x40d4c5
push edi
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x40d541
or eax, 0xffffffff
jmp 0x40d4c5
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [ebp + 0x10]
mov dword [esi], eax
test eax, eax
je 0x40d518
cmp eax, 0xffffffff
je 0x40d518
push 1
mov edx, esi
mov ecx, eax
call fcn.0040d3cd
pop ecx
jmp 0x40d4c3
push edi
push 0x80
push 3
lea eax, [ebp - 0xc]
push eax
push 2
push 0x40000000
push 0x4378e8
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x40d4c1
test eax, eax
je 0x40d4c1
mov ecx, dword [esi]
lea edx, [ebp + 0x10]
push 1
call fcn.0040d3cd
pop ecx
mov ecx, esi
call fcn.0040d3b8
mov eax, dword [ebp + 0x10]
mov dword [esi], eax
jmp 0x40d4c3
Function at 0x40d55f
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ecx]
push esi
push edi
xor edi, edi
mov dword [ebp - 0xc], 0xc
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
test al, 0x10
je 0x40d59a
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [ebp + 0x10]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x40d5d5
mov dword [esi], edi
mov eax, dword [esi]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
test al, 1
je 0x40d5bf
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
test eax, eax
jne 0x40d592
push edi
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x40d60c
or eax, 0xffffffff
jmp 0x40d592
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [ebp + 0x10]
mov dword [esi], eax
test eax, eax
je 0x40d5e3
cmp eax, 0xffffffff
je 0x40d5e3
push 1
mov edx, esi
mov ecx, eax
call fcn.0040d3cd
pop ecx
jmp 0x40d590
push edi
push 0x80
push 3
lea eax, [ebp - 0xc]
push eax
push 1
push 0x80000000
push 0x4378e8
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x40d58e
test eax, eax
je 0x40d58e
mov ecx, dword [esi]
lea edx, [ebp + 0x10]
push 1
call fcn.0040d3cd
pop ecx
mov ecx, esi
call fcn.0040d3b8
mov eax, dword [ebp + 0x10]
mov dword [esi], eax
jmp 0x40d590

Function at 0x40d68f
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
xor ecx, ecx
cmp dword [esi + 0x30], ecx
jne 0x40d6b3
lea eax, [ebp - 4]
push eax
push ecx
push esi
push 0x40d819
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x30], eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40d6b8
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x30]
cmp dword [edi], 0
je 0x40d717
push ebx
lea ebx, [esi + 0x34]
push dword [ebx]
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp eax, 0x1f6
je 0x40d716
add esi, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x1f6
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push 0x3e8
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, edi
call fcn.0040d3b8
push 0x1f6
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebx
pop edi
pop esi
ret
Function at 0x40e388
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push edi
cmp dword [esi + 8], 0
jne 0x40e3a8
and dword [esi + 8], 0
and dword [esi + 0xc], 0
call fcn.0040e367
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
xor edi, edi
cmp dword [ebp + 0xc], edi
jbe 0x40e3f9
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jne 0x40e3e3
push 0
lea eax, [ebp + 8]
push eax
push 0x10000
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40e3f8
mov eax, dword [ebp + 8]
test eax, eax
je 0x40e3f8
and dword [esi + 0xc], 0
mov dword [esi + 8], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
mov al, byte [ecx + eax]
mov byte [edi + ebx], al
inc edi
inc dword [esi + 0xc]
cmp edi, dword [ebp + 0xc]
jb 0x40e3b3
pop ebx
add dword [esi + 0x10], edi
mov eax, edi
pop edi
adc dword [esi + 0x14], 0
pop esi
pop ebp
ret 8

Function at 0x40e408
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
call fcn.0040e439
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
add dword [esi + 0x10], eax
adc dword [esi + 0x14], 0
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x40e9b9
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
mov eax, dword [0x43b034]
xor eax, esp
mov dword [esp + 0x258], eax
push esi
mov esi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40ea02
lea ecx, [esp + 8]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x40e9f7
or eax, eax
jmp 0x40ea02
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x25c]
pop esi
xor ecx, esp
call fcn.004126e7
mov esp, ebp
pop ebp
ret

Function at 0x410168
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x410193
xor eax, eax
jmp 0x4101a6
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
ret 4
Function at 0x403a90
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404de1
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x408460]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
xor edi, edi
mov dword [esi + 0x24], edi
mov dword [ebp - 4], edi
mov dword [esi + 0x2c], edi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov dword [esi + 4], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [esi], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x14], ecx
mov cl, byte [ebp + 0x28]
mov dword [esi + 8], edx
mov edx, dword [ebp + 0x20]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x24]
mov byte [ebp - 4], 1
mov dword [esi + 0xc], ebx
mov dword [esi + 0x18], edx
mov dword [esi + 0x1c], eax
mov byte [esi + 0x20], cl
mov dword [esi + 0x30], edi
test cl, cl
jne 0x403b63
mov dword [ebp + 0x28], edi
test eax, eax
je 0x403b30
lea ecx, [edx + 0xc]
mov edx, eax
mov eax, dword [ecx]
cmp eax, edi
jbe 0x403b1a
mov edi, eax
add ecx, 0x10
dec edx
jne 0x403b12
mov dword [ebp + 0x28], edi
mov eax, 0x406784
cmp edi, 0x100000
ja 0x403b33
lea eax, [ebp + 0x28]
mov eax, dword [eax]
mov dword [esi + 0x28], eax
add eax, 0xa
push eax
call fcn.00404230
mov edi, eax
mov eax, dword [esi + 0x24]
add esp, 4
cmp eax, edi
je 0x403b59
push eax
call fcn.004042c6
add esp, 4
mov dword [esi + 0x24], edi
push 0
call fcn.004042c6
add esp, 4
xor ecx, ecx
mov eax, ebx
mov edx, 0x44
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.00404230
add esp, 4
mov dword [ebp + 0x28], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x403baf
push 0x402640
push 0x402600
push ebx
lea edi, [eax + 4]
push 0x44
push edi
mov dword [eax], ebx
call fcn.0040438d
jmp 0x403bb1
xor edi, edi
mov eax, dword [esi + 0x2c]
mov byte [ebp - 4], 1
cmp eax, edi
je 0x403be0
test eax, eax
je 0x403bdd
mov ecx, dword [eax - 4]
lea ebx, [eax - 4]
push 0x402640
push ecx
push 0x44
push eax
call fcn.0040432a
push ebx
call fcn.004042c6
add esp, 4
mov dword [esi + 0x2c], edi
mov ecx, esi
call fcn.004036d0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24

Function at 0x4042c6
Capabilities:
Resolve function by parsing pe exports

Disassembly:
add byte [eax], al
dec eax
mov dword [esp + 0x48], ecx
cmp dword [ecx + 0x24], 0
jne 0x4042db
dec eax
mov esi, dword [ecx + 0x50]
xor edi, edi
jmp 0x4042f9
inc ecx
mov eax, 0x1dd
dec eax
lea edx, [0x15970]
dec eax
lea ecx, [0x159c5]
call dword [0x15263]
xor edi, edi
mov esi, edi
dec eax
mov dword [esp + 0x40], esi
dec ebp
mov edi, dword [esp + 0x18]
dec esp
mov dword [esp + 0x58], edi
inc ebp
mov esi, dword [esp + 8]
inc esp
mov dword [esp + 0x3c], esi
dec ebp
mov ebp, dword [esp + 0x110]
dec esp
mov dword [esp + 0x50], ebp
nop word [eax + eax]
Function at 0x405eba
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push esi
mov esi, 0x104
lea eax, [ebp - 0x120]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, esi
pop esi
jbe 0x405ede
xor eax, eax
test eax, eax
je 0x405ef0
cmp byte [ebp + eax - 0x121], 0x5c
je 0x405ef0
xor ecx, ecx
jmp 0x405ef3
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx + 0x409010]
lea eax, [ebp + eax - 0x120]
push ecx
push str._s_s.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x120]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
leave
ret 4

Function at 0x405f97
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x422acc], 0
push esi
jne 0x405fce
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405fa8
mov dword [ecx*4 + 0x422ac8], eax
inc ecx
cmp ecx, 0x100
jl 0x405fa3
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405fff
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x422ac8]
xor eax, esi
inc ecx
dec edx
jne 0x405fe1
pop edi
not eax
pop esi
ret 0xc

Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x40de38
nop
nop
mov ecx, 0x1975b8d
nop
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x43304e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x433024
nop
nop
nop
mov eax, section..rsrc
mov ebx, 0x4304d8
nop
nop
mov ecx, 0x5f886238
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x433084
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
add eax, 4
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x43306c
nop
nop
popal
nop
nop
nop
jmp 0x431219
Function at 0x10026b3
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
lea eax, [ebp - 4]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push eax
push 0
mov ebx, ecx
push 0
push 3
push dword [ebx]
call edi
test eax, eax
jne 0x1002703
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1002703
push dword [ebp - 4]
call fcn.01003480
mov esi, eax
pop ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push 3
push dword [ebx]
call edi
test eax, eax
jne 0x1002710
push esi
call fcn.010031f0
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
leave
ret 8
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi]
mov dword [ecx], eax
shl eax, 2
push eax
call fcn.01003480
mov ebx, dword [ebp + 8]
xor edi, edi
pop ecx
mov dword [ebx], eax
cmp dword [esi], edi
jle 0x100275a
lea eax, [esi + 4]
mov dword [ebp + 0xc], eax
push 0xc
call fcn.010035e0
test eax, eax
pop ecx
je 0x100274a
push dword [ebp + 0xc]
mov ecx, eax
call fcn.010020d1
jmp 0x100274c
xor eax, eax
mov ecx, dword [ebx]
add dword [ebp + 0xc], 0xc
mov dword [ecx + edi*4], eax
inc edi
cmp edi, dword [esi]
jl 0x1002732
push esi
call fcn.010031f0
pop ecx
xor eax, eax
jmp 0x1002709

Function at 0x1002d70
Capabilities:
Terminate process

Disassembly:
cmp dword [0x100a828], 2
je 0x1002d7e
call fcn.010041d0
mov eax, dword [esp + 4]
push eax
call fcn.01004210
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x1002ec0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x100a874]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x1002edf
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x100a870], 1
mov byte [0x100a86c], bl
jne 0x1002f39
mov ecx, dword [0x100bc28]
test ecx, ecx
je 0x1002f27
mov esi, dword [0x100bc24]
sub esi, 4
cmp esi, ecx
jb 0x1002f27
mov eax, dword [esi]
test eax, eax
je 0x1002f20
call eax
mov ecx, dword [0x100bc28]
sub esi, 4
cmp esi, ecx
jae 0x1002f12
push 0x100801c
push 0x1008014
call fcn.01002f70
add esp, 8
push 0x1008024
push 0x1008020
call fcn.01002f70
add esp, 8
test ebx, ebx
jne 0x1002f60
push ebp
mov dword [0x100a874], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x1003ce0
Capabilities:
Query environment variable

Disassembly:
sub esp, 8
mov eax, dword [0x100aa88]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
test eax, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
jne 0x1003d33
call esi
test eax, eax
mov dword [esp + 0x10], eax
je 0x1003d17
mov eax, 1
jmp 0x1003d2a
call edi
test eax, eax
mov dword [esp + 0x10], eax
je 0x1003ed2
mov eax, 2
mov ebx, dword [esp + 0x10]
mov dword [0x100aa88], eax
cmp eax, 1
jne 0x1003dbc
test ebx, ebx
jne 0x1003d56
cmp eax, 2
jne 0x1003eb6
test ebx, ebx
jne 0x1003ddf
call edi
test eax, eax
mov dword [esp + 0x10], eax
jne 0x1003ddb
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov ebx, dword [esp + 0x10]
mov al, byte [ebx]
mov esi, ebx
test al, al
je 0x1003e27
mov ecx, dword [0x100aab0]
push 0
push 0
push 0xffffffffffffffff
push esi
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x1003ed2
mov ebp, dword [esp + 0x14]
mov edi, esi
add ebp, eax
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x14], ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [esi + ecx + 1]
lea esi, [esi + ecx + 1]
test al, al
jne 0x1003de7
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
lea edx, [eax + eax]
push edx
call fcn.01003480
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x1003e53
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
les ecx, [eax]
mov eax, dword [esp + 0x10]
mov esi, ebp
cmp byte [eax], 0
je 0x1003ea4

Function at 0x1003ee0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x100aa90]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
test eax, eax
jne 0x1003f16
call edi
test eax, eax
je 0x1003f06
mov eax, 1
jmp 0x1003f11
call esi
test eax, eax
je 0x1003f81
mov eax, 2
mov dword [0x100aa90], eax
cmp eax, 1
jne 0x1003f22
call edi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x1003f8a
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
mov edi, eax
mov eax, dword [0x100aab0]
push 0
push 0xffffffffffffffff
push edi
push 1
push eax
call ebp
mov esi, eax
test esi, esi
jne 0x1003f4d
pop edi
pop esi
pop ebp
pop ebx
ret
lea ecx, [esi + esi]
push ecx
call fcn.01003480
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x1003f64
pop edi
pop esi
pop ebp
pop ebx
ret
mov edx, dword [0x100aab0]
push esi
push ebx
push 0xffffffffffffffff
push edi
push 1
add dword [edx - 1], edx
aad 0x85
invalid
jne 0x1003f88
push ebx
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x1004210
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x10083b0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x1004234
add eax, 8
inc ebp
cmp eax, 0x1008440
jb 0x1004225
cmp ecx, dword [ebp*8 + 0x10083b0]
jne 0x10043db
invalid
mov eax, dword [0x100a828]
cmp eax, 1
je 0x100439d
test eax, eax
jne 0x1004260
cmp dword [0x1008084], 1
je 0x100439d
cmp ecx, 0xfc
je 0x10043db
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x100429b
mov ecx, 5
mov esi, 0x1001c94
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x10042e4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x1001c90
add ebx, ecx
push ebx
call fcn.01005ca0
add esp, 0xc
mov ecx, 6
mov esi, 0x1001c74
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x1001c70
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x1001c48
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x10083b4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.01005c10
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x100ab00]
test eax, eax
je 0x10043ae
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x10043b8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x10083b4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor 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 edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
les ebp, [eax - 0x3cffffff]