joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1012135
Capabilities:
Get geographical location

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0xb0
mov eax, dword [0x10171b0]
and word [ebp - 0x34], 0
push ebx
push esi
push edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
and dword [ebp - 0x40], 0
push 0x27
pop ecx
mov dword [ebp + 0x6c], eax
xor eax, eax
lea edi, [ebp - 0x32]
rep stosd dword es:[edi], eax
push 0x50
pop ebx
stosw word es:[edi], ax
push ebx
lea eax, [ebp - 0x34]
push eax
push 0x23
mov edi, 0x400
push edi
call esi
test eax, eax
je 0x1012209
xor eax, eax
cmp word [ebp - 0x34], 0x30
sete al
test eax, eax
mov dword [ebp - 0x38], eax
je 0x10121af
push ebx
lea eax, [ebp - 0x34]
push eax
push 0x1005
push edi
call esi
test eax, eax
je 0x1012209
xor eax, eax
cmp word [ebp - 0x34], 0x31
sete al
mov dword [ebp - 0x40], eax
push ebx
lea eax, [ebp - 0x34]
push eax
push 0x25
push edi
call esi
test eax, eax
je 0x1012209
xor eax, eax
cmp word [ebp - 0x34], 0x31
push ebx
sete al
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x34]
push eax
push 0x1e
push edi
call esi
xor esi, esi
cmp eax, esi
je 0x1012209
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [ebp + 0x7c]
xor ecx, ecx
cmp dword [ebp - 0x3c], esi
setne cl
add eax, ecx
mov ecx, dword [ebp - 0x38]
neg ecx
sbb ecx, ecx
and ecx, 3
lea eax, [eax + ecx + 4]
cmp eax, ebx
jbe 0x1012205
xor eax, eax
cmp eax, esi
jne 0x101221c
push dword [ebp + 0x7c]
push 0x100275c
push dword [ebp + 0x78]
call dword [sym.imp.SHLWAPI.dll_StrCpyNW]
jmp 0x101228a
cmp dword [ebp - 0x38], esi
mov edi, dword [ebp + 0x78]
mov word [edi], si
je 0x1012241
cmp dword [ebp - 0x40], esi
je 0x1012239
push ebx
push 0x1002754
push edi
call dword [sym.imp.SHLWAPI.dll_StrCpyNW]
push ebx
mov ebx, 0x1002750
jmp 0x1012247
push ebx
mov ebx, 0x100274c
mov esi, dword [sym.imp.SHLWAPI.dll_StrCatBuffW]
push ebx
push edi
call esi
cmp dword [ebp - 0x3c], 0
je 0x101225e
push dword [ebp + 0x7c]
push ebx
push edi
call esi
push dword [ebp + 0x7c]
lea eax, [ebp - 0x34]
push eax
push edi
call esi
push dword [ebp + 0x7c]
push 0x1002744
push edi
call esi
cmp dword [ebp - 0x38], 0
je 0x101228a
cmp dword [ebp - 0x40], 0
jne 0x101228a
push dword [ebp + 0x7c]
push 0x100273c
push edi
call esi
mov ecx, dword [ebp + 0x6c]
pop edi
pop esi
pop ebx
call fcn.0101207f
add ebp, 0x70
leave
ret 8
Function at 0x401540
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x1c]
push edi
push eax
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.00415657
mov ebx, dword [esi + 0x78]
mov edx, dword [esi + 0x80]
mov ecx, dword [esi + 0x94]
sub ebx, edx
sub ebx, 0x14
xor edi, edi
dec ecx
mov ebp, eax
js 0x4015a6
test edi, edi
jl 0x4016c3
cmp edi, dword [esi + 0x94]
jge 0x4016c3
mov edx, dword [esi + 0x90]
mov eax, dword [edx + edi*4]
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [esi + 0x94]
inc edi
dec ecx
cmp edi, ecx
jle 0x401574
mov eax, dword [esi + 0x54]
mov ecx, dword [eax + 0x1c]
lea edx, [esp + 0x10]
push edx
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
lea edx, [esp + 0x10]
push edx
mov ecx, ebp
call fcn.00419bee
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
sub eax, ebx
push 1
mov dword [esp + 0x20], eax
sub eax, ecx
push eax
mov eax, dword [esp + 0x18]
sub edx, eax
push edx
push ecx
mov ecx, dword [esi + 0x54]
push eax
call fcn.004176b1
mov eax, dword [esi + 0xa8]
xor edi, edi
dec eax
js 0x401685
jmp 0x401600
test edi, edi
jl 0x4016c3
cmp edi, dword [esi + 0xa8]
jge 0x4016c3
mov edx, dword [esi + 0xa4]
mov eax, dword [edx + edi*4]
lea ecx, [esp + 0x10]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebp
call fcn.00419bee
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov edx, dword [esi + 0xa8]
sub ecx, ebx
sub eax, ebx
cmp edi, edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], eax
jge 0x4016c3
mov edx, dword [esp + 0x18]
push 1
sub eax, ecx
push eax
mov eax, dword [esp + 0x18]
sub edx, eax
push edx
push ecx
push eax
mov eax, dword [esi + 0xa4]
mov ecx, dword [eax + edi*4]
push ecx
call dword [sym.imp.USER32.dll_MoveWindow]
mov edx, dword [esi + 0xa8]
inc edi
dec edx
cmp edi, edx
jle 0x401600
mov ecx, dword [ebp + 0x1c]
lea eax, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
sub eax, ebx
push 1
mov dword [esp + 0x20], eax
sub eax, ecx
push eax
mov eax, dword [esp + 0x18]
sub edx, eax
push edx
push ecx
push eax
mov ecx, ebp
call fcn.004176b1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
jmp fcn.00413c4e

Function at 0x403c13
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x403c28
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x403c3a
xor eax, eax
jmp 0x403c6c
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x403c5e
cmp esi, eax
jae 0x403c36
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x403c50
cmp esi, eax
jae 0x403c36
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret
Function at 0x404877
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00404710
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x404912
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x42abe0]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x404912
cmp eax, 1
je 0x404933
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x404912
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4048df
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40490e
xor eax, eax
inc eax
jmp 0x404952
cmp edi, eax
jae 0x404916
xor eax, eax
jmp 0x404952
cmp eax, esi
jae 0x40491d
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x42abe0]
jmp 0x404936
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404aca
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x420150
call fcn.00405658
mov edi, 0x94
mov eax, edi
call fcn.00404710
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 [0x42abe0], ecx
mov eax, dword [esi + 4]
mov dword [0x42abec], eax
mov edx, dword [esi + 8]
mov dword [0x42abf0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x42abe4], esi
cmp ecx, 2
je 0x404b2a
or esi, 0x8000
mov dword [0x42abe4], esi
shl eax, 8
add eax, edx
mov dword [0x42abe8], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x404b65
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404b65
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x404b7d
cmp eax, 0x20b
je 0x404b6a
mov dword [ebp - 0x1c], esi
jmp 0x404b91
cmp dword [ecx + 0x84], 0xe
jbe 0x404b65
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x404b8b
cmp dword [ecx + 0x74], 0xe
jbe 0x404b65
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00408096
pop ecx
test eax, eax
jne 0x404ba5
push 0x1c
call fcn.00404aa6
pop ecx
call fcn.00406ff5
test eax, eax
jne 0x404bb6
push 0x10
call fcn.00404aa6
pop ecx
call fcn.004097b4
mov dword [ebp - 4], esi
call fcn.004095b6
test eax, eax
jge 0x404bcf
push 0x1b
call fcn.00404a81
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x42c670], eax
call fcn.00409494
mov dword [0x42abcc], eax
call fcn.004093f2
test eax, eax
jge 0x404bf5
push 8
call fcn.00404a81
pop ecx
call fcn.004091bf
test eax, eax
jge 0x404c06
push 9
call fcn.00404a81
pop ecx
push 1
call fcn.00405789
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x404c1c
push eax
call fcn.00404a81
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00409162
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x404c3d
movzx eax, word [ebp - 0x40]
jmp 0x404c40
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00413236
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x404c5e
push edi
call fcn.004058b6
call fcn.004058d8
jmp 0x404c90
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00405693
ret
Function at 0x4057f3
Capabilities:
Terminate process

Disassembly:
push 8
push 0x4201c0
call fcn.00405658
push 8
call fcn.0040804b
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x42ac20], esi
jne 0x405827
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x42ac1c], esi
mov al, byte [ebp + 0x10]
mov byte [0x42ac18], al
cmp dword [ebp + 0xc], edi
jne 0x405871
cmp dword [0x42c668], edi
je 0x405861
mov eax, dword [0x42c664]
sub eax, 4
mov dword [0x42c664], eax
cmp eax, dword [0x42c668]
jb 0x405861
mov eax, dword [eax]
cmp eax, edi
je 0x405842
call eax
jmp 0x405842
push 0x4270a4
mov eax, 0x42709c
call fcn.00405771
pop ecx
push 0x4270b0
mov eax, 0x4270a8
call fcn.00405771
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x4058a2
cmp dword [ebp + 0x10], edi
jne 0x4058b0
mov dword [0x42ac20], esi
push dword [ebp + 8]
call fcn.0040572f
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x4058af
push 8
call fcn.00407f96
pop ecx
ret
call fcn.00405693
ret
Function at 0x408c25
Capabilities:
Parse pe header

Disassembly:
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 0x408c53
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x408c5a
cmp ebx, dword [eax + 4]
jae 0x408c5a
xor eax, eax
jmp 0x408e4a
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x408c6b
xor eax, eax
inc eax
jmp 0x408e49
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x408c81
cmp ecx, edx
jae 0x408dc6
cmp dword [eax + 4], 0
je 0x408c8a
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x408c72
cmp dword [ebp + 8], 0
je 0x408cac
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x408dc6
cmp eax, esi
jae 0x408dc6
mov eax, dword [0x42ada8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x408cd1
cmp dword [esi*4 + 0x42adb0], edi
je 0x408dca
inc esi
cmp esi, eax
jl 0x408cbf
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x408e46
cmp dword [ebp - 8], 0x1000000
jne 0x408e46
test byte [ebp - 0xc], 0xcc
je 0x408d4f
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x408e46
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x408e46
cmp word [eax + 0x18], 0x10b
jne 0x408e46
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x408e46
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x408d4f
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x408d4f
test byte [ecx + 0x27], 0x80
jne 0x408dc6
push 1
push 0x42adf0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x408c63
mov ecx, dword [0x42ada8]
test ecx, ecx
mov edx, ecx
jle 0x408d83
lea eax, [ecx*4 + 0x42adac]
cmp dword [eax], edi
je 0x408d83
dec edx
sub eax, 4
test edx, edx
jg 0x408d77
test edx, edx
jne 0x408db4
push 0xf
pop ebx
cmp ecx, ebx
jg 0x408d90
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x408da8
lea eax, [edx*4 + 0x42adb0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x408d96
cmp ecx, 0x10
jge 0x408db4
inc ecx
mov dword [0x42ada8], ecx
push 0
push 0x42adf0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x408c63
xor eax, eax
jmp 0x408e49
test esi, esi
jle 0x408c63
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x42adf0
call ebx
test eax, eax
jne 0x408c63
cmp dword [esi*4 + 0x42adb0], edi
je 0x408e20
mov eax, dword [0x42ada8]
lea esi, [eax - 1]
test esi, esi
jl 0x408e0e
cmp dword [esi*4 + 0x42adb0], edi
je 0x408e0a
dec esi
jns 0x408dfe
test esi, esi
jge 0x408e1e
cmp eax, 0x10
jge 0x408e19
inc eax
mov dword [0x42ada8], eax
lea esi, [eax - 1]
jmp 0x408e20
je 0x408e38
xor ecx, ecx
test esi, esi
jl 0x408e38
lea eax, [ecx*4 + 0x42adb0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x408e26
push 0
push 0x42adf0
call ebx
jmp 0x408c63
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408e4e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x427988]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x427f48]
je 0x408e83
inc eax
cmp eax, 0x13
jb 0x408e74
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x427f48]
jne 0x408fa9
mov eax, dword [0x42abd4]
cmp eax, 1
je 0x408f81
cmp eax, edx
jne 0x408eb3
cmp dword [0x427984], 1
je 0x408f81
cmp ecx, 0xfc
je 0x408fa9
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x408ee9
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040b220
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004051d0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x408f1d
mov eax, edi
push eax
call fcn.004051d0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4208f0
push edi
call fcn.0040c1b0
add esp, 0x10
push edi
call fcn.004051d0
push dword [esi + 0x427f4c]
mov ebx, eax
call fcn.004051d0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00404710
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040b220
push edi
push ebx
call fcn.0040b230
push 0x4208d0
push ebx
call fcn.0040b230
push dword [esi + 0x427f4c]
push ebx
call fcn.0040b230
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040db64
add esp, 0x2c
jmp 0x408fa9
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x427f4c]
push dword [esi]
call fcn.004051d0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00404d64
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40db64
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x42b068], ebx
push esi
push edi
jne 0x40dbe4
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40dc1f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x42210c
push edi
call esi
test eax, eax
mov dword [0x42b068], eax
je 0x40dc1f
push 0x4220fc
push edi
call esi
push 0x4220e8
push edi
mov dword [0x42b06c], eax
call esi
cmp dword [0x42abe0], 2
mov dword [0x42b070], eax
jne 0x40dbe4
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x42b078], eax
je 0x40dbe4
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x42b074], eax
mov eax, dword [0x42b074]
test eax, eax
je 0x40dc29
call eax
test eax, eax
je 0x40dc10
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x42b078]
test eax, eax
je 0x40dc10
test byte [ebp - 8], 1
jne 0x40dc29
cmp dword [0x42abec], 4
jb 0x40dc23
or byte [ebp + 0x12], 0x20
jmp 0x40dc48
xor eax, eax
jmp 0x40dc58
or byte [ebp + 0x12], 4
jmp 0x40dc48
mov eax, dword [0x42b06c]
test eax, eax
je 0x40dc48
call eax
mov ebx, eax
test ebx, ebx
je 0x40dc48
mov eax, dword [0x42b070]
test eax, eax
je 0x40dc48
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x42b068]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ddc0
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x427988]
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 0x40ddf1
xor eax, eax
jmp 0x40df7a
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 + 0x42c300]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40de2d
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0040f337
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40df08
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40df46
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 0x40de91
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40de82
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 0x40de62
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 0x40ded1
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40deda
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40de53
jmp 0x40dedc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40df75
cmp dword [ebp - 0x6c], edi
je 0x40df46
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40df3b
call fcn.0040641a
mov dword [eax], 9
call fcn.00406423
mov dword [eax], esi
jmp 0x40df70
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 0x40df30
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40dedc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40dedc
push dword [ebp - 0x6c]
call fcn.0040642c
pop ecx
jmp 0x40df70
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40df5e
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40df5e
xor eax, eax
jmp 0x40df78
call fcn.0040641a
mov dword [eax], 0x1c
call fcn.00406423
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40df78
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00404d64
add ebp, 0x3a0
leave
ret
Function at 0x40f6cc
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 0x40f8a0
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x42c300]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40f8a0
test cl, 0x48
je 0x40f737
cmp byte [eax + 5], 0xa
je 0x40f737
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 0x40f789
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40f771
call fcn.0040641a
mov dword [eax], 9
call fcn.00406423
mov dword [eax], esi
jmp 0x40f781
cmp eax, 0x6d
je 0x40f8a0
push eax
call fcn.0040642c
pop ecx
or eax, 0xffffffff
jmp 0x40f8a2
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40f89b
test eax, eax
je 0x40f7b0
cmp byte [ebx], 0xa
jne 0x40f7b0
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40f7b9
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 0x40f895
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40f885
cmp al, 0xd
je 0x40f7eb
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40f877
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40f805
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40f800
add dword [ebp + 0x10], 2
jmp 0x40f859
mov dword [ebp + 0x10], eax
jmp 0x40f873
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 0x40f82d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40f873
cmp dword [ebp - 0xc], 0
je 0x40f873
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40f84e
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40f859
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40f876
cmp ebx, dword [ebp + 0xc]
jne 0x40f85e
cmp byte [ebp - 1], 0xa
jne 0x40f85e
mov byte [ebx], 0xa
jmp 0x40f876
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040dca1
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40f877
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40f7cf
jmp 0x40f895
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40f895
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 0x40f8a2
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret