joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401340
Capabilities:
Create process on windows
Enumerate pe sections

Disassembly:
sub esp, 0x264
mov eax, dword [0x40c118]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x270], eax
lea eax, [esp + 0x16c]
push 0x104
push eax
call fcn.00401290
mov eax, dword [esp + 0x280]
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor edx, edx
add esp, 8
cmp word [ecx + 6], dx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
jbe 0x401526
mov ebx, dword [sym.imp.ole32.dll_CoInitialize]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathCombineA]
mov dword [esp + 0x10], edx
jmp 0x4013b0
mov eax, dword [esp + 0x278]
jmp 0x4013b0
mov ecx, dword [eax + 0x3c]
add ecx, dword [esp + 0x10]
lea eax, [ecx + eax + 0xf8]
mov edi, str..brand
mov esi, eax
mov ecx, 7
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x401502
mov esi, dword [eax + 0xc]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x34]
mov eax, dword [esi + ecx]
add esi, ecx
cmp eax, 0x5242
jne 0x401541
push edx
call ebx
lea ecx, [esi + 0x10c]
push ecx
lea edx, [esp + 0x170]
push edx
lea eax, [esp + 0x70]
push eax
call ebp
mov ecx, dword [esi + 0x14c]
push ecx
lea edx, [esi + 0x150]
push edx
lea eax, [esp + 0x70]
push eax
call fcn.004011d0
xor eax, eax
mov ecx, 0xf
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
add esp, 0xc
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x68]
push edx
mov dword [esp + 0x30], 0x3c
mov dword [esp + 0x34], 0x40
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], str.open
mov dword [esp + 0x4c], 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov ecx, dword [esi + 8]
or eax, 0xffffffff
cmp ecx, eax
je 0x401471
cmp dword [esi + 4], eax
jne 0x401490
push 0
lea eax, [esp + 0x20]
push eax
push 0
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov ecx, dword [esp + 0x24]
mov dword [esi + 4], ecx
mov edx, dword [esp + 0x28]
mov dword [esi + 8], edx
push 4
call fcn.004025d4
add esp, 4
test eax, eax
je 0x4014b9
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push edx
push 0
push 0
lea ecx, [esi + 0xc]
push ecx
push 0
mov ecx, eax
call fcn.004015a0
jmp 0x4014bb
xor eax, eax
push 0x11c
mov dword [0x40c7c4], eax
call fcn.004025d4
mov edi, eax
add esp, 4
test edi, edi
je 0x4014ec
mov ecx, dword [0x40c7c4]
add esi, 0xc
push esi
call fcn.004016f0
push eax
mov ecx, edi
call fcn.00401dd0
jmp 0x4014ee
xor eax, eax
mov dword [0x40c7c8], eax
mov ecx, dword [0x40c7c4]
call fcn.00401700
test al, al
jne 0x4014f3
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
movzx ecx, word [edx + 6]
inc eax
add esi, 0x28
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
jl 0x40139d
xor eax, eax
mov ecx, dword [esp + 0x270]
pop edi
pop esi
pop ebp
pop ebx
call fcn.00402b55
add esp, 0x264
ret 0x10
push 0x10
push str.Error
push str.Bad_file_table.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
jmp 0x401528
Function at 0x403099
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40a5b0
call fcn.00403fa0
mov edi, 0x94
mov eax, edi
call fcn.00406bf0
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 [0x40c890], ecx
mov eax, dword [esi + 4]
mov dword [0x40c89c], eax
mov edx, dword [esi + 8]
mov dword [0x40c8a0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40c894], esi
cmp ecx, 2
je 0x4030f9
or esi, 0x8000
mov dword [0x40c894], esi
shl eax, 8
add eax, edx
mov dword [0x40c898], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x403134
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x403134
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40314c
cmp eax, 0x20b
je 0x403139
mov dword [ebp - 0x1c], esi
jmp 0x403160
cmp dword [ecx + 0x84], 0xe
jbe 0x403134
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40315a
cmp dword [ecx + 0x74], 0xe
jbe 0x403134
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040568d
pop ecx
test eax, eax
jne 0x40318c
cmp dword [0x40c828], 1
jne 0x403179
call fcn.004063b0
push 0x1c
call fcn.00406239
push 0xff
call fcn.00404b7f
pop ecx
pop ecx
call fcn.00406b59
mov dword [ebp - 4], esi
call fcn.004069ae
test eax, eax
jge 0x4031a5
push 0x1b
call fcn.00403074
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40de18], eax
call fcn.0040688c
mov dword [0x40c820], eax
call fcn.004067ea
test eax, eax
jge 0x4031cb
push 8
call fcn.00403074
pop ecx
call fcn.004065b7
test eax, eax
jge 0x4031dc
push 9
call fcn.00403074
pop ecx
push 1
call fcn.00404baf
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4031f2
push eax
call fcn.00403074
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040655a
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x403213
movzx eax, word [ebp - 0x40]
jmp 0x403216
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401340
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x403234
push edi
call fcn.00404cda
call fcn.00404cfc
jmp 0x403266
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00403fdb
ret
Function at 0x4042fc
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 0x40432a
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 0x404331
cmp ebx, dword [eax + 4]
jae 0x404331
xor eax, eax
jmp 0x404521
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x404342
xor eax, eax
inc eax
jmp 0x404520
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x404358
cmp ecx, edx
jae 0x40449d
cmp dword [eax + 4], 0
je 0x404361
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x404349
cmp dword [ebp + 8], 0
je 0x404383
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40449d
cmp eax, esi
jae 0x40449d
mov eax, dword [0x40c838]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4043a8
cmp dword [esi*4 + 0x40c840], edi
je 0x4044a1
inc esi
cmp esi, eax
jl 0x404396
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40451d
cmp dword [ebp - 8], 0x1000000
jne 0x40451d
test byte [ebp - 0xc], 0xcc
je 0x404426
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40451d
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40451d
cmp word [eax + 0x18], 0x10b
jne 0x40451d
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40451d
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x404426
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x404426
test byte [ecx + 0x27], 0x80
jne 0x40449d
push 1
push 0x40c880
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40433a
mov ecx, dword [0x40c838]
test ecx, ecx
mov edx, ecx
jle 0x40445a
lea eax, [ecx*4 + 0x40c83c]
cmp dword [eax], edi
je 0x40445a
dec edx
sub eax, 4
test edx, edx
jg 0x40444e
test edx, edx
jne 0x40448b
push 0xf
pop ebx
cmp ecx, ebx
jg 0x404467
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40447f
lea eax, [edx*4 + 0x40c840]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40446d
cmp ecx, 0x10
jge 0x40448b
inc ecx
mov dword [0x40c838], ecx
push 0
push 0x40c880
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40433a
xor eax, eax
jmp 0x404520
test esi, esi
jle 0x40433a
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x40c880
call ebx
test eax, eax
jne 0x40433a
cmp dword [esi*4 + 0x40c840], edi
je 0x4044f7
mov eax, dword [0x40c838]
lea esi, [eax - 1]
test esi, esi
jl 0x4044e5
cmp dword [esi*4 + 0x40c840], edi
je 0x4044e1
dec esi
jns 0x4044d5
test esi, esi
jge 0x4044f5
cmp eax, 0x10
jge 0x4044f0
inc eax
mov dword [0x40c838], eax
lea esi, [eax - 1]
jmp 0x4044f7
je 0x40450f
xor ecx, ecx
test esi, esi
jl 0x40450f
lea eax, [ecx*4 + 0x40c840]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4044fd
push 0
push 0x40c880
call ebx
jmp 0x40433a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404827
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40dcc4]
mov eax, dword [0x40c118]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x4049ed
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40dce0]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x4049ed
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x404891
xor eax, eax
jmp 0x404a01
test al, 0x20
je 0x4048a2
push 2
push edi
push edi
push ecx
call fcn.00407d36
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x404977
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x4049be
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x404904
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4048f5
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x4048d7
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404944
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x404950
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x4048cb
jmp 0x404952
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x4049e8
cmp dword [ebp + 0x3a4], edi
je 0x4049be
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x4049b0
mov dword [0x40c888], eax
jmp 0x4049f4
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4049a2
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x404952
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x404952
push dword [ebp + 0x3a4]
call fcn.00404d8c
pop ecx
jmp 0x4049fe
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4049d6
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40488a
mov dword [0x40c884], 0x1c
mov dword [0x40c888], edi
jmp 0x4049fe
sub eax, dword [ebp - 0x7c]
jmp 0x404a01
and dword [0x40c888], 0
mov dword [0x40c884], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00402b55
add ebp, 0x39c
leave
ret
Function at 0x404c19
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40c8d0], esi
push edi
jne 0x404c39
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x40c8cc], esi
mov byte [0x40c8c8], al
jne 0x404c9f
mov ecx, dword [0x40de0c]
test ecx, ecx
je 0x404c80
mov eax, dword [0x40de08]
sub eax, 4
cmp eax, ecx
jmp 0x404c79
mov eax, dword [eax]
test eax, eax
je 0x404c6b
call eax
mov eax, dword [0x40de08]
sub eax, 4
cmp eax, dword [0x40de0c]
mov dword [0x40de08], eax
jae 0x404c63
mov eax, 0x40c028
mov esi, 0x40c030
cmp eax, esi
mov edi, eax
jae 0x404c9f
mov eax, dword [edi]
test eax, eax
je 0x404c98
call eax
add edi, 4
cmp edi, esi
jb 0x404c90
mov eax, 0x40c034
mov esi, 0x40c03c
cmp eax, esi
mov edi, eax
jae 0x404cbe
mov eax, dword [edi]
test eax, eax
je 0x404cb7
call eax
add edi, 4
cmp edi, esi
jb 0x404caf
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x404cd8
push dword [ebp + 8]
mov dword [0x40c8d0], 1
call fcn.00404b7f
pop ebp
ret

Function at 0x406239
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40c118]
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 + 0x40c2c8]
je 0x40626e
inc eax
cmp eax, 0x13
jb 0x40625f
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40c2c8]
jne 0x406394
mov eax, dword [0x40c828]
cmp eax, 1
je 0x40636c
cmp eax, edx
jne 0x40629e
cmp dword [0x40c130], 1
je 0x40636c
cmp ecx, 0xfc
je 0x406394
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 0x4062d4
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00407640
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00403730
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x406308
mov eax, edi
push eax
call fcn.00403730
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40a63c
push edi
call fcn.00407840
add esp, 0x10
push edi
call fcn.00403730
push dword [esi + 0x40c2cc]
mov ebx, eax
call fcn.00403730
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00406bf0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00407640
push edi
push ebx
call fcn.00407650
push 0x40a638
push ebx
call fcn.00407650
push dword [esi + 0x40c2cc]
push ebx
call fcn.00407650
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00407738
add esp, 0x2c
jmp 0x406394
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40c2cc]
push dword [esi]
call fcn.00403730
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.00402b55
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x407738
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40ca08], ebx
push esi
push edi
jne 0x4077b8
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4077f3
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40ad34
push edi
call esi
test eax, eax
mov dword [0x40ca08], eax
je 0x4077f3
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40ca0c], eax
call esi
cmp dword [0x40c890], 2
mov dword [0x40ca10], eax
jne 0x4077b8
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40ca18], eax
je 0x4077b8
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40ca14], eax
mov eax, dword [0x40ca14]
test eax, eax
je 0x4077fd
call eax
test eax, eax
je 0x4077e4
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40ca18]
test eax, eax
je 0x4077e4
test byte [ebp - 8], 1
jne 0x4077fd
cmp dword [0x40c89c], 4
jb 0x4077f7
or byte [ebp + 0x12], 0x20
jmp 0x40781c
xor eax, eax
jmp 0x40782c
or byte [ebp + 0x12], 4
jmp 0x40781c
mov eax, dword [0x40ca0c]
test eax, eax
je 0x40781c
call eax
mov ebx, eax
test ebx, ebx
je 0x40781c
mov eax, dword [0x40ca10]
test eax, eax
je 0x40781c
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40ca08]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40870c
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00406bf0
mov eax, dword [0x40c118]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x40dcc4]
mov dword [ebp - 4], eax
jae 0x40884f
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x40dce0]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40884f
push 1
push esi
push ebx
call fcn.00407c3f
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x408859
push 2
push esi
push ebx
call fcn.00407c3f
add esp, 0xc
cmp eax, 0xffffffff
je 0x408859
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x4087f9
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00403f40
push 0x8000
push ebx
call fcn.00409137
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x4087b8
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.00404827
add esp, 0xc
cmp eax, 0xffffffff
je 0x4087d6
sub edi, eax
test edi, edi
jg 0x4087ad
jmp 0x4087ec
cmp dword [0x40c888], 5
jne 0x4087e9
mov dword [0x40c884], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.00409137
pop ecx
pop ecx
jmp 0x408839
jge 0x408839
push 0
push dword [ebp + 0xc]
push ebx
call fcn.00407c3f
push ebx
call fcn.00407af2
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, 0xffffffff
jne 0x408839
mov dword [0x40c884], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40c888], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.00407c3f
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40885c
mov dword [0x40c884], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00402b55
leave
ret
Function at 0x408868
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x40dcc4]
push edi
jae 0x408a3d
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x40dce0]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x408a3d
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x408913
test dl, 2
jne 0x408913
test dl, 0x48
je 0x4088dd
cmp byte [eax + 5], 0xa
je 0x4088dd
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408926
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40890e
mov dword [0x40c888], ecx
jmp 0x408a44
cmp eax, 0x6d
jne 0x40891a
xor eax, eax
jmp 0x408a51
push eax
call fcn.00404d8c
pop ecx
jmp 0x408a4e
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x408a38
test eax, eax
je 0x40894d
cmp byte [ebx], 0xa
jne 0x40894d
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x408956
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x408a32
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x408a22
cmp al, 0xd
je 0x408988
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x408a14
dec ecx
cmp dword [ebp - 8], ecx
jae 0x4089a2
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40899d
add dword [ebp - 8], 2
jmp 0x4089f6
mov dword [ebp - 8], eax
jmp 0x408a10
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
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 0x4089ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x408a10
cmp dword [ebp - 0x10], 0
je 0x408a10
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4089eb
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4089f6
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x408a13
cmp ebx, dword [ebp + 0xc]
jne 0x4089fb
cmp byte [ebp - 1], 0xa
jne 0x4089fb
mov byte [ebx], 0xa
jmp 0x408a13
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00407c3f
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x408a14
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40896c
jmp 0x408a32
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x408a32
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x408a51
and dword [0x40c888], 0
mov dword [0x40c884], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4093c5
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.00406bf0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x409460
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 [0x40c890]
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 0x409460
cmp eax, 1
je 0x409481
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 0x409460
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40942d
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40945c
xor eax, eax
inc eax
jmp 0x4094a0
cmp edi, eax
jae 0x409464
xor eax, eax
jmp 0x4094a0
cmp eax, esi
jae 0x40946b
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 [0x40c890]
jmp 0x409484
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 0x10c3370
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
push edi
push 0x1a
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x10c338e
pop edi
pop esi
xor al, al
pop ebx
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [esp + 0x14]
push 0x10ec074
push ecx
mov edi, eax
call fcn.010d7198
mov esi, eax
add esp, 8
test esi, esi
jne 0x10c33cb
pop edi
pop esi
xor al, al
pop ebx
ret
push esi
push ebx
push 1
push edi
call fcn.010d702e
push esi
call fcn.010d6fb1
add esp, 0x14
mov al, 1
pop edi
pop esi
pop ebx
ret