joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402a80
Capabilities:
Check os version
Log keystrokes
Log keystrokes via polling

Disassembly:
sub esp, 0x140
push ebx
mov ebx, dword [esp + 0x148]
cmp bl, 0x90
push ebp
push esi
push edi
mov ebp, ecx
jne 0x402bc3
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [esp + 0x14], eax
mov ax, word [esp + 0x158]
mov ebx, 1
cmp ax, bx
jb 0x402c5d
mov esi, dword [sym.imp.USER32.dll_keybd_event]
movzx eax, ax
mov dword [esp + 0x10], eax
lea esp, [esp]
mov al, byte [esp + 0x160]
test al, al
je 0x402afd
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x402ae8
mov ecx, dword [ebp + 8]
mov dword [ebp + 0xc], ecx
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402af6
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp + 0xc], 0
mov eax, dword [esp + 0x14]
cmp eax, 0x80000000
jae 0x402b26
push 0
push ebx
push 0x45
push 0x90
call esi
push 0
push 3
push 0x45
push 0x90
call esi
jmp 0x402bac
cmp ah, 0xa
jb 0x402b68
xor eax, eax
push 0x1c
lea edx, [esp + 0x1c]
mov ecx, 0xd
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov eax, 0x90
push edx
push 2
mov dword [esp + 0x40], ebx
mov dword [esp + 0x24], ebx
mov word [esp + 0x44], ax
mov word [esp + 0x28], ax
mov dword [esp + 0x48], 2
call dword [sym.imp.USER32.dll_SendInput]
jmp 0x402bac
push 0x90
call dword [sym.imp.USER32.dll_GetKeyState]
mov bx, ax
lea eax, [esp + 0x50]
push eax
and bl, 1
call dword [sym.imp.USER32.dll_GetKeyboardState]
test bl, bl
mov al, byte [esp + 0xe0]
je 0x402b93
and al, 0xfe
jmp 0x402b95
or al, 1
lea ecx, [esp + 0x50]
push ecx
mov byte [esp + 0xe4], al
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov ebx, 1
dec dword [esp + 0x10]
jne 0x402ad0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret 0x10
movzx edx, bl
xor edi, edi
push edi
push edx
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov byte [esp + 0x14], al
mov ax, word [esp + 0x158]
cmp ax, 1
jb 0x402c5d
mov esi, dword [esp + 0x14]
movzx eax, ax
mov dword [esp + 0x10], eax
lea ecx, [ecx]
mov al, byte [esp + 0x160]
test al, al
je 0x402c17
cmp dword [ebp + 0xc], edi
jne 0x402c06
mov ecx, dword [ebp + 8]
mov dword [ebp + 0xc], ecx
mov eax, dword [ebp + 0xc]
cmp eax, edi
je 0x402c14
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp + 0xc], edi
xor eax, eax
lea esp, [esp]
cmp byte [eax + str.______.], bl
je 0x402c6a
inc eax
cmp eax, 0xa
jl 0x402c20
xor al, al
xor edx, edx
test al, al
setne dl
mov ecx, ebp
push edx
push esi
push ebx
call fcn.00402680
mov al, byte [esp + 0x15c]
test al, al
je 0x402c57
push 3
push esi
push ebx
mov ecx, ebp
call fcn.00402680
dec dword [esp + 0x10]
jne 0x402bf0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret 0x10
mov al, 1
jmp 0x402c30
Function at 0x402c70
Capabilities:
Log keystrokes

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x14]
mov ebx, ebp
shr ebx, 8
push esi
mov al, bl
and al, 1
push edi
mov edi, dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov esi, ecx
mov byte [esp + 0x1c], al
je 0x402ccb
push 0
push 0x10
call edi
mov byte [esp + 0x14], al
xor eax, eax
mov edi, edi
cmp byte [eax + str.______.], 0x10
je 0x402d96
inc eax
cmp eax, 0xa
jl 0x402ca0
xor al, al
mov edx, dword [esp + 0x14]
xor ecx, ecx
test al, al
setne cl
push ecx
push edx
push 0x10
mov ecx, esi
call fcn.00402680
mov al, bl
shr al, 1
and al, 1
mov byte [esp + 0x13], al
je 0x402d0e
push 0
push 0x11
call edi
mov byte [esp + 0x14], al
xor eax, eax
cmp byte [eax + str.______.], 0x11
je 0x402d9d
inc eax
cmp eax, 0xa
jl 0x402ce3
xor al, al
mov edx, dword [esp + 0x14]
xor ecx, ecx
test al, al
setne cl
push ecx
push edx
push 0x11
mov ecx, esi
call fcn.00402680
shr bl, 2
and bl, 1
je 0x402d49
push 0
push 0x12
call edi
mov byte [esp + 0x14], al
xor eax, eax
cmp byte [eax + str.______.], 0x12
je 0x402da4
inc eax
cmp eax, 0xa
jl 0x402d22
xor al, al
mov edx, dword [esp + 0x14]
xor ecx, ecx
test al, al
setne cl
push ecx
push edx
push 0x12
mov ecx, esi
call fcn.00402680
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push 1
push eax
push ecx
push ebp
mov ecx, esi
call fcn.00402a80
mov al, byte [esp + 0x1c]
test al, al
je 0x402d6e
push 0x10
mov ecx, esi
call fcn.00402700
mov al, byte [esp + 0x13]
test al, al
je 0x402d7f
push 0x11
mov ecx, esi
call fcn.00402700
test bl, bl
je 0x402d8c
push 0x12
mov ecx, esi
call fcn.00402700
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
mov al, 1
jmp 0x402cb5
mov al, 1
jmp 0x402cf8
mov al, 1
jmp 0x402d33
Function at 0x404fb3
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.004051b0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40504e
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 [0x424b7c]
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 0x40504e
cmp eax, 1
je 0x40506f
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 0x40504e
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40501b
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40504a
xor eax, eax
inc eax
jmp 0x40508e
cmp edi, eax
jae 0x405052
xor eax, eax
jmp 0x40508e
cmp eax, esi
jae 0x405059
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 [0x424b7c]
jmp 0x405072
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 0x405577
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41c3f8
call fcn.004068a8
mov edi, 0x94
mov eax, edi
call fcn.004051b0
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 [0x424b7c], ecx
mov eax, dword [esi + 4]
mov dword [0x424b88], eax
mov edx, dword [esi + 8]
mov dword [0x424b8c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x424b80], esi
cmp ecx, 2
je 0x4055d7
or esi, 0x8000
mov dword [0x424b80], esi
shl eax, 8
add eax, edx
mov dword [0x424b84], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x405612
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x405612
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40562a
cmp eax, 0x20b
je 0x405617
mov dword [ebp - 0x1c], esi
jmp 0x40563e
cmp dword [ecx + 0x84], 0xe
jbe 0x405612
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x405638
cmp dword [ecx + 0x74], 0xe
jbe 0x405612
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00406d98
pop ecx
test eax, eax
jne 0x405652
push 0x1c
call fcn.00405553
pop ecx
call fcn.004083af
test eax, eax
jne 0x405663
push 0x10
call fcn.00405553
pop ecx
call fcn.004095ce
mov dword [ebp - 4], esi
call fcn.004093d0
test eax, eax
jge 0x40567c
push 0x1b
call fcn.0040552e
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x426450], eax
call fcn.004092ae
mov dword [0x424b6c], eax
call fcn.0040920c
test eax, eax
jge 0x4056a2
push 8
call fcn.0040552e
pop ecx
call fcn.00408fd9
test eax, eax
jge 0x4056b3
push 9
call fcn.0040552e
pop ecx
push 1
call fcn.00405891
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4056c9
push eax
call fcn.0040552e
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00408f7c
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4056ea
movzx eax, word [ebp - 0x40]
jmp 0x4056ed
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040f579
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40570b
push edi
call fcn.004059be
call fcn.004059e0
jmp 0x40573d
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004068e3
ret
Function at 0x4058fb
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41c430
call fcn.004068a8
push 8
call fcn.00406d4d
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x424bbc], esi
jne 0x40592f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x424bb8], esi
mov al, byte [ebp + 0x10]
mov byte [0x424bb4], al
cmp dword [ebp + 0xc], edi
jne 0x405979
cmp dword [0x426448], edi
je 0x405969
mov eax, dword [0x426444]
sub eax, 4
mov dword [0x426444], eax
cmp eax, dword [0x426448]
jb 0x405969
mov eax, dword [eax]
cmp eax, edi
je 0x40594a
call eax
jmp 0x40594a
push 0x421094
mov eax, 0x42108c
call fcn.00405879
pop ecx
push 0x4210a0
mov eax, 0x421098
call fcn.00405879
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x4059aa
cmp dword [ebp + 0x10], edi
jne 0x4059b8
mov dword [0x424bbc], esi
push dword [ebp + 8]
call fcn.00405837
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x4059b7
push 8
call fcn.00406c98
pop ecx
ret
call fcn.004068e3
ret
Function at 0x4085ba
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 0x4085e8
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 0x4085ef
cmp ebx, dword [eax + 4]
jae 0x4085ef
xor eax, eax
jmp 0x4087df
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x408600
xor eax, eax
inc eax
jmp 0x4087de
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x408616
cmp ecx, edx
jae 0x40875b
cmp dword [eax + 4], 0
je 0x40861f
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x408607
cmp dword [ebp + 8], 0
je 0x408641
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40875b
cmp eax, esi
jae 0x40875b
mov eax, dword [0x424d40]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x408666
cmp dword [esi*4 + 0x424d48], edi
je 0x40875f
inc esi
cmp esi, eax
jl 0x408654
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4087db
cmp dword [ebp - 8], 0x1000000
jne 0x4087db
test byte [ebp - 0xc], 0xcc
je 0x4086e4
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4087db
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4087db
cmp word [eax + 0x18], 0x10b
jne 0x4087db
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4087db
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4086e4
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4086e4
test byte [ecx + 0x27], 0x80
jne 0x40875b
push 1
push 0x424d88
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4085f8
mov ecx, dword [0x424d40]
test ecx, ecx
mov edx, ecx
jle 0x408718
lea eax, [ecx*4 + 0x424d44]
cmp dword [eax], edi
je 0x408718
dec edx
sub eax, 4
test edx, edx
jg 0x40870c
test edx, edx
jne 0x408749
push 0xf
pop ebx
cmp ecx, ebx
jg 0x408725
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40873d
lea eax, [edx*4 + 0x424d48]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40872b
cmp ecx, 0x10
jge 0x408749
inc ecx
mov dword [0x424d40], ecx
push 0
push 0x424d88
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4085f8
xor eax, eax
jmp 0x4087de
test esi, esi
jle 0x4085f8
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x424d88
call ebx
test eax, eax
jne 0x4085f8
cmp dword [esi*4 + 0x424d48], edi
je 0x4087b5
mov eax, dword [0x424d40]
lea esi, [eax - 1]
test esi, esi
jl 0x4087a3
cmp dword [esi*4 + 0x424d48], edi
je 0x40879f
dec esi
jns 0x408793
test esi, esi
jge 0x4087b3
cmp eax, 0x10
jge 0x4087ae
inc eax
mov dword [0x424d40], eax
lea esi, [eax - 1]
jmp 0x4087b5
je 0x4087cd
xor ecx, ecx
test esi, esi
jl 0x4087cd
lea eax, [ecx*4 + 0x424d48]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4087bb
push 0
push 0x424d88
call ebx
jmp 0x4085f8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408c68
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x421c28]
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 + 0x422198]
je 0x408c9d
inc eax
cmp eax, 0x13
jb 0x408c8e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x422198]
jne 0x408dc3
mov eax, dword [0x424b74]
cmp eax, 1
je 0x408d9b
cmp eax, edx
jne 0x408ccd
cmp dword [0x421c24], 1
je 0x408d9b
cmp ecx, 0xfc
je 0x408dc3
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 0x408d03
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040afd0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00405da0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x408d37
mov eax, edi
push eax
call fcn.00405da0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x41caf8
push edi
call fcn.004087f0
add esp, 0x10
push edi
call fcn.00405da0
push dword [esi + 0x42219c]
mov ebx, eax
call fcn.00405da0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004051b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040afd0
push edi
push ebx
call fcn.0040afe0
push 0x41cad8
push ebx
call fcn.0040afe0
push dword [esi + 0x42219c]
push ebx
call fcn.0040afe0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040c369
add esp, 0x2c
jmp 0x408dc3
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x42219c]
push dword [esi]
call fcn.00405da0
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.004057d4
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40c369
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x425010], ebx
push esi
push edi
jne 0x40c3e9
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40c424
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x41d4ec
push edi
call esi
test eax, eax
mov dword [0x425010], eax
je 0x40c424
push 0x41d4dc
push edi
call esi
push 0x41d4c8
push edi
mov dword [0x425014], eax
call esi
cmp dword [0x424b7c], 2
mov dword [0x425018], eax
jne 0x40c3e9
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x425020], eax
je 0x40c3e9
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x42501c], eax
mov eax, dword [0x42501c]
test eax, eax
je 0x40c42e
call eax
test eax, eax
je 0x40c415
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x425020]
test eax, eax
je 0x40c415
test byte [ebp - 8], 1
jne 0x40c42e
cmp dword [0x424b88], 4
jb 0x40c428
or byte [ebp + 0x12], 0x20
jmp 0x40c44d
xor eax, eax
jmp 0x40c45d
or byte [ebp + 0x12], 4
jmp 0x40c44d
mov eax, dword [0x425014]
test eax, eax
je 0x40c44d
call eax
mov ebx, eax
test ebx, ebx
je 0x40c44d
mov eax, dword [0x425018]
test eax, eax
je 0x40c44d
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x425010]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c5c5
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x421c28]
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 0x40c5f6
xor eax, eax
jmp 0x40c77f
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 + 0x4260e0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40c632
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0040d9a0
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40c70d
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40c74b
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 0x40c696
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40c687
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 0x40c667
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 0x40c6d6
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40c6df
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40c658
jmp 0x40c6e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40c77a
cmp dword [ebp - 0x6c], edi
je 0x40c74b
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40c740
call fcn.00406aba
mov dword [eax], 9
call fcn.00406ac3
mov dword [eax], esi
jmp 0x40c775
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 0x40c735
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40c6e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40c6e1
push dword [ebp - 0x6c]
call fcn.00406acc
pop ecx
jmp 0x40c775
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40c763
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40c763
xor eax, eax
jmp 0x40c77d
call fcn.00406aba
mov dword [eax], 0x1c
call fcn.00406ac3
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40c77d
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.004057d4
add ebp, 0x3a0
leave
ret
Function at 0x40dc27
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 0x40ddfb
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4260e0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40ddfb
test cl, 0x48
je 0x40dc92
cmp byte [eax + 5], 0xa
je 0x40dc92
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 0x40dce4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40dccc
call fcn.00406aba
mov dword [eax], 9
call fcn.00406ac3
mov dword [eax], esi
jmp 0x40dcdc
cmp eax, 0x6d
je 0x40ddfb
push eax
call fcn.00406acc
pop ecx
or eax, 0xffffffff
jmp 0x40ddfd
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40ddf6
test eax, eax
je 0x40dd0b
cmp byte [ebx], 0xa
jne 0x40dd0b
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40dd14
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 0x40ddf0
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40dde0
cmp al, 0xd
je 0x40dd46
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40ddd2
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40dd60
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40dd5b
add dword [ebp + 0x10], 2
jmp 0x40ddb4
mov dword [ebp + 0x10], eax
jmp 0x40ddce
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 0x40dd88
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40ddce
cmp dword [ebp - 0xc], 0
je 0x40ddce
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40dda9
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40ddb4
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40ddd1
cmp ebx, dword [ebp + 0xc]
jne 0x40ddb9
cmp byte [ebp - 1], 0xa
jne 0x40ddb9
mov byte [ebx], 0xa
jmp 0x40ddd1
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040c4a6
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40ddd2
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40dd2a
jmp 0x40ddf0
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40ddf0
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 0x40ddfd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x410dab
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x54], 0
mov eax, dword [edi + 0x58]
mov esi, dword [edi + 0x5c]
mov dword [ebp - 4], eax
je 0x410de2
call fcn.00417eda
mov ebx, dword [eax + 0xc]
push 5
push dword [edi + 0x54]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x410df3
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
xor ebx, ebx
inc ebx
test esi, esi
je 0x410e2c
cmp word [esi + 2], 0xffff
mov ecx, dword [esi]
jne 0x410e11
mov ecx, dword [esi + 0xc]
mov ax, word [esi + 0x12]
mov si, word [esi + 0x14]
jmp 0x410e19
mov ax, word [esi + 0xa]
mov si, word [esi + 0xc]
test cx, 0x1801
jne 0x410e2a
test ax, ax
jne 0x410e2a
test si, si
je 0x410e2c
xor ebx, ebx
cmp dword [edi + 0x54], 0
je 0x410e3b
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret