joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46a390
Capabilities:
Check os version

Disassembly:
sub esp, 0xa0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0x9c
push eax
call esi
test eax, eax
jne 0x46a3d1
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 0x94
push ecx
call esi
test eax, eax
je 0x46a43e
cmp dword [esp + 0x1c], 2
jne 0x46a43e
cmp dword [esp + 0x10], 5
jne 0x46a43e
cmp dword [esp + 0x14], 1
jne 0x46a43e
push str.kernel32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x46a428
push str.IsWow64Process
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x46a419
lea edx, [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
jmp 0x46a421
mov dword [esp + 8], 0
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 8]
test eax, eax
je 0x46a43e
pop edi
mov eax, 1
pop esi
add esp, 0xa0
ret
pop edi
xor eax, eax
pop esi
add esp, 0xa0
ret

Function at 0x46d000
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x46d066
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x46d066
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x46d047
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret

Function at 0x46d3f0
Capabilities:
Create http request

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x46d428
mov edx, dword [esi + 4]
xor eax, eax
push 0
push 0
mov ecx, dword [edx - 8]
test ecx, ecx
setne al
mov ecx, eax
neg ecx
sbb ecx, ecx
and ecx, edx
neg eax
sbb eax, eax
push ecx
and eax, 2
inc eax
push eax
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.0_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi], eax
mov ecx, dword [esi]
xor eax, eax
test ecx, ecx
setne al
pop esi
ret
Function at 0x46e100
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x46e149
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x46e5c0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x490020
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.0046e170
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.0046e1f0
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.0046e1f0
lea ecx, [esi + 0xc]
call fcn.004818b3
lea ecx, [esi + 0x10]
call fcn.004818b3
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.0046f780
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.0046f780
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.0046f780
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.00481928
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.00481928
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x483ccc
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x483d04
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00481d83
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00481d5b
jmp 0x483d10
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4853bd
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4853ff
call fcn.0048b137
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4853ff
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4853f6
xor eax, eax
jmp 0x485407
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0048540d
pop edi
pop esi
pop ebx
ret 4

Function at 0x48b667
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x48b695
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x48b6b3
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0048b5cd
jmp 0x48b6b3
mov eax, dword [esi + 0x14]
test eax, eax
je 0x48b6b3
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0048b5cd
test edi, edi
mov eax, edi
jne 0x48b69d
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x50ec50
Capabilities:
Execute syscall

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
cmp dword [ebp + 8], 0
jge 0x50ec72
mov eax, 0xfffffffd
jmp 0x50ecea
mov ebx, dword [0x56391c]
add ebx, 0x1c
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 4]
cmp dword [ebx], 0
je 0x50ecb8
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0xffff
shr ecx, 0x10
and ecx, 0xffff
mov edx, dword [ebp]
lea edx, [edx + 8]
call dword fs:[0xc0]
nop
nop
nop
nop
nop
leave
ret 4
mov ebx, dword [0x56391c]
add ebx, 0x1c
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 4]
cmp dword [ebx], 0
jne 0x50ece0
mov eax, dword [ebp + 8]
mov edx, dword [ebp]
lea edx, [edx + 8]
int 0x2e
nop
leave
ret 4
mov eax, 0
jmp 0x50ecea
mov esp, ebp
pop ebp
ret 4
Function at 0x10001010
Capabilities:
Check if file exists
Create directory

Disassembly:
mov ecx, 0x10010c84
jmp fcn.100021f0

Function at 0x10001020
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Get common file path

Disassembly:
sub esp, 0x108
mov eax, dword [0x100100e4]
push esi
push 0x1000d1f0
mov dword [esp + 0x10c], eax
mov eax, dword [0x10010c80]
push 0x65
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x100010f1
mov ecx, dword [0x10010c80]
push ebx
push ebp
push edi
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, dword [0x10010c80]
push esi
push edx
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
lea eax, [esp + 0x10]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [esp + 0x10]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10001090
mov ecx, dword [str.Dll.cab]
mov edx, dword [0x1000d1ec]
lea eax, [esp + 0x10]
mov dword [edi], ecx
push 0x1000d1e4
push eax
mov dword [edi + 4], edx
call fcn.1000305c
mov esi, eax
push esi
push ebp
push 1
push ebx
call fcn.10002fb4
push esi
call fcn.10002e5c
add esp, 0x1c
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
pop edi
pop ebp
pop ebx
jne 0x10001109
push eax
push 0x1000d1dc
push 0x1000d1cc
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop esi
mov ecx, dword [esp + 0x104]
call fcn.100030a0
add esp, 0x108
ret 4
mov edx, dword [esp + 0x110]
push edx
lea eax, [esp + 8]
push eax
mov ecx, 0x10010c84
call fcn.100021f0
mov ecx, dword [esp + 0x108]
pop esi
call fcn.100030a0
add esp, 0x108
ret 4
Function at 0x100021f0
Capabilities:
Check if file exists
Create directory

Disassembly:
sub esp, 0x334
mov eax, dword [0x100100e4]
push ebp
mov ebp, dword [esp + 0x33c]
test ebp, ebp
mov dword [esp + 0x334], eax
je 0x100023e4
mov eax, dword [esp + 0x340]
test eax, eax
je 0x100023e4
lea edx, [esp + 0x28]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x10002227
lea eax, [esp + 0x28]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10002238
sub eax, edx
cmp byte [esp + eax + 0x27], 0x5c
push edi
je 0x10002261
lea edi, [esp + 0x2c]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10002250
mov ax, word [0x1000d218]
mov word [edi], ax
push ebx
lea ecx, [esp + 0xc]
push ecx
push 1
push 0x100013b0
push 0x100013a0
push 0x10001390
push 0x10001380
push 0x10001370
push 0x10001360
push 0x10001350
call sub.Cabinet.dll_FDICreate
mov ebx, eax
add esp, 0x24
test ebx, ebx
jne 0x100022b2
pop ebx
pop edi
pop ebp
mov ecx, dword [esp + 0x330]
call fcn.100030a0
add esp, 0x334
ret 8
push esi
push 0
push 0x8020
push ebp
call fcn.1000399e
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
jne 0x100022ee
push ebx
call sub.Cabinet.dll_FDIDestroy
add esp, 4
xor eax, eax
pop esi
pop ebx
pop edi
pop ebp
mov ecx, dword [esp + 0x330]
call fcn.100030a0
add esp, 0x334
ret 8
lea edx, [esp + 0x1c]
push edx
push esi
push ebx
call sub.Cabinet.dll_FDIIsCabinet
add esp, 0xc
test eax, eax
push esi
jne 0x10002312
call fcn.10003fca
push ebx
call sub.Cabinet.dll_FDIDestroy
add esp, 8
jmp 0x100022d3
call fcn.10003fca
push 0x5c
push ebp
call fcn.10004500
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, eax
add esp, 0xc
test esi, esi
lea eax, [esp + 0x23c]
jne 0x1000234a
push ebp
push eax
call edi
push 0x1000d1f4
lea ecx, [esp + 0x13c]
push ecx
call edi
jmp 0x10002370
lea edx, [esi + 1]
push edx
push eax
call edi
sub esi, ebp
lea ecx, [esi + 1]
push ecx
lea edx, [esp + 0x13c]
push ebp
push edx
call fcn.100043d0
add esp, 0xc
mov byte [esp + esi + 0x139], 0
lea eax, [esp + 0x34]
test eax, eax
jne 0x10002382
lea ecx, [esp + 0x138]
push ecx
jmp 0x10002387
lea edx, [esp + 0x34]
push edx
push 0x10010c88
call edi
push 0x10010c88
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x100023a9
push eax
push 0x10010c88
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
push 0
push 0x10001f20
push 0
lea eax, [esp + 0x148]
push eax
lea ecx, [esp + 0x250]
push ecx
push ebx
call sub.Cabinet.dll_FDICopy
add esp, 0x1c
cmp eax, 1
push ebx
jne 0x100022cb
call sub.Cabinet.dll_FDIDestroy
add esp, 4
jmp 0x100022d5
mov ecx, dword [esp + 0x334]
xor eax, eax
pop ebp
call fcn.100030a0
add esp, 0x334
ret 8
Function at 0x10002970
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push 0xffffffffffffffff
push 0x1000c08b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x26c
mov eax, dword [0x100100e4]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push edi
mov edi, dword [esp + 0x288]
mov dword [esp + 0x274], eax
push edi
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x18], ecx
call ebp
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x1000d21c
lea ecx, [esp + 0x34]
push ecx
call esi
lea edx, [esp + 0x134]
push edx
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x100029e8
xor eax, eax
jmp 0x10002aff
push ebx
xor ebx, ebx
jmp 0x100029f0
test byte [esp + 0x138], 0x10
je 0x10002a46
cmp byte [esp + 0x164], 0x2e
je 0x10002ad3
push edi
lea ecx, [esp + 0x38]
push ecx
call ebp
lea edx, [esp + 0x164]
push edx
lea eax, [esp + 0x38]
push eax
call esi
push 0x1000d218
lea ecx, [esp + 0x38]
push ecx
call esi
mov edx, dword [esp + 0x290]
mov ecx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.10002970
jmp 0x10002ad3
push edi
lea ecx, [esp + 0x38]
push ecx
call ebp
lea edx, [esp + 0x164]
push edx
lea eax, [esp + 0x38]
push eax
call esi
lea eax, [esp + 0x34]
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10002a74
sub eax, edx
push eax
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x20]
call fcn.10001ad0
mov ecx, dword [esp + 0x290]
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x288], ebx
call fcn.100028e0
cmp dword [esp + 0x30], 0x10
mov dword [esp + 0x284], 0xffffffff
jb 0x10002ac3
mov eax, dword [esp + 0x1c]
push eax
call fcn.1000452d
add esp, 4
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x138]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x100029f0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x278]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x26c]
pop ebp
call fcn.100030a0
add esp, 0x278
ret 8
Function at 0x10003a48
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x10003c1c
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x100114c0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x10003c1c
test cl, 0x48
je 0x10003ab3
cmp byte [eax + 5], 0xa
je 0x10003ab3
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10003b05
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x10003aed
call fcn.1000593a
mov dword [eax], 9
call fcn.10005943
mov dword [eax], esi
jmp 0x10003afd
cmp eax, 0x6d
je 0x10003c1c
push eax
call fcn.1000594c
pop ecx
or eax, 0xffffffff
jmp 0x10003c1e
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x10003c17
test eax, eax
je 0x10003b2c
cmp byte [ebx], 0xa
jne 0x10003b2c
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x10003b35
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x10003c11
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x10003c01
cmp al, 0xd
je 0x10003b67
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x10003bf3
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x10003b81
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x10003b7c
add dword [ebp + 0x10], 2
jmp 0x10003bd5
mov dword [ebp + 0x10], eax
jmp 0x10003bef
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10003ba9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10003bef
cmp dword [ebp - 0xc], 0
je 0x10003bef
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x10003bca
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x10003bd5
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x10003bf2
cmp ebx, dword [ebp + 0xc]
jne 0x10003bda
cmp byte [ebp - 1], 0xa
jne 0x10003bda
mov byte [ebx], 0xa
jmp 0x10003bf2
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10004065
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x10003bf3
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x10003b4b
jmp 0x10003c11
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x10003c11
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x10003c1e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10003cce
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x100100e4]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x10003cff
xor eax, eax
jmp 0x10003e88
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x100114c0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x10003d3b
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.100074ef
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x10003e16
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x10003e54
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x10003d9f
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x10003d90
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x10003d70
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10003ddf
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x10003de8
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x10003d61
jmp 0x10003dea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x10003e83
cmp dword [ebp - 0x6c], edi
je 0x10003e54
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x10003e49
call fcn.1000593a
mov dword [eax], 9
call fcn.10005943
mov dword [eax], esi
jmp 0x10003e7e
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10003e3e
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x10003dea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x10003dea
push dword [ebp - 0x6c]
call fcn.1000594c
pop ecx
jmp 0x10003e7e
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x10003e6c
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x10003e6c
xor eax, eax
jmp 0x10003e86
call fcn.1000593a
mov dword [eax], 0x1c
call fcn.10005943
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x10003e86
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.100030a0
add ebp, 0x3a0
leave
ret
Function at 0x10004bc9
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
cmp eax, 1
push esi
jne 0x10004cb9
mov eax, 0x94
call fcn.10009410
mov esi, esp
push esi
mov dword [esi], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x10004d2e
mov ecx, dword [esi + 0x10]
mov dword [0x10010dc0], ecx
mov eax, dword [esi + 4]
mov dword [0x10010dcc], eax
mov edx, dword [esi + 8]
mov dword [0x10010dd0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
cmp ecx, 2
mov dword [0x10010dc4], esi
je 0x10004c34
or esi, 0x8000
mov dword [0x10010dc4], esi
shl eax, 8
add eax, edx
push 1
mov dword [0x10010dc8], eax
call fcn.100061f7
test eax, eax
pop ecx
je 0x10004d2e
call fcn.100083a8
test eax, eax
jne 0x10004c61
call fcn.10006248
jmp 0x10004d2e
call fcn.10009382
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x10012604], eax
call fcn.10009260
mov dword [0x10010da0], eax
call fcn.10006f2b
test eax, eax
jl 0x10004cb2
call fcn.100091be
test eax, eax
jl 0x10004cad
call fcn.10008f8b
test eax, eax
jl 0x10004cad
push 0
call fcn.10005e96
test eax, eax
pop ecx
jne 0x10004cad
inc dword [0x10010d9c]
jmp 0x10004d3f
call fcn.10007129
call fcn.10008191
jmp 0x10004c57
test eax, eax
jne 0x10004ce9
cmp dword [0x10010d9c], eax
jle 0x10004d2e
dec dword [0x10010d9c]
cmp dword [0x10010dfc], eax
jne 0x10004cd8
call fcn.10005fd4
call fcn.10007129
call fcn.10008191
call fcn.10006248
jmp 0x10004d3f
cmp eax, 2
jne 0x10004d32
push 0x8c
push 1
call fcn.10008ed0
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x10004d2e
push esi
push dword [0x10010664]
call dword [0x10010f6c]
test eax, eax
push esi
je 0x10004d28
call fcn.100081ae
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x10004d3f
call fcn.10003646
pop ecx
xor eax, eax
jmp 0x10004d42
cmp eax, 3
jne 0x10004d3f
push 0
call fcn.10008379
pop ecx
xor eax, eax
inc eax
lea esp, [ebp - 4]
pop esi
pop ebp
ret 0xc

Function at 0x10005f00
Capabilities:
Terminate process

Disassembly:
push 8
push 0x1000d620
call fcn.10005564
push 8
call fcn.100061ac
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x10010e00], esi
jne 0x10005f34
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x10010dfc], esi
mov al, byte [ebp + 0x10]
mov byte [0x10010df8], al
cmp dword [ebp + 0xc], edi
jne 0x10005f7e
cmp dword [0x100115ec], edi
je 0x10005f6e
mov eax, dword [0x100115e8]
sub eax, 4
mov dword [0x100115e8], eax
cmp eax, dword [0x100115ec]
jb 0x10005f6e
mov eax, dword [eax]
cmp eax, edi
je 0x10005f4f
call eax
jmp 0x10005f4f
push 0x10010034
mov eax, 0x10010028
call fcn.10005e7e
pop ecx
push 0x10010040
mov eax, 0x10010038
call fcn.10005e7e
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x10005faf
cmp dword [ebp + 0x10], edi
jne 0x10005fbd
mov dword [0x10010e00], esi
push dword [ebp + 8]
call fcn.10005e3c
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x10005fbc
push 8
call fcn.100060f7
pop ecx
ret
call fcn.1000559f
ret
Function at 0x10006dea
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.10009410
mov eax, dword [0x100100e4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.10004065
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x1008], eax
je 0x10006f1d
push 2
push esi
push dword [ebp + 8]
call fcn.10004065
add esp, 0xc
cmp eax, ebx
je 0x10006f1d
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x10006ebd
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.10009d70
push 0x8000
push dword [ebp + 8]
call fcn.10009cfe
add esp, 0x14
mov dword [ebp - 0x100c], eax
cmp edi, ebx
mov eax, ebx
jge 0x10006e73
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call fcn.10003cce
add esp, 0xc
cmp eax, 0xffffffff
je 0x10006e93
sub edi, eax
test edi, edi
jg 0x10006e6b
jmp 0x10006eab
call fcn.10005943
cmp dword [eax], 5
jne 0x10006ea8
call fcn.1000593a
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0x100c]
push dword [ebp + 8]
call fcn.10009cfe
pop ecx
pop ecx
jmp 0x10006f05
jge 0x10006f05
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.10004065
push dword [ebp + 8]
call fcn.10007270
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x10006f05
call fcn.1000593a
mov dword [eax], 0xd
call fcn.10005943
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0x1008]
push dword [ebp + 8]
call fcn.10004065
add esp, 0xc
mov eax, esi
pop edi
jmp 0x10006f1f
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.100030a0
leave
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x100077f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1000594c
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x1000781b
test byte [esp + 8], 2
je 0x1000781b
call fcn.1000593a
mov dword [eax], 0xd
call fcn.10005943
mov dword [eax], 5
jmp 0x100077f4
xor eax, eax
ret