joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401da0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408008
push 0x4043a4
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x409490], eax
xor eax, eax
mov al, byte [0x409491]
mov dword [0x40949c], eax
mov eax, dword [0x409490]
shr dword [0x409490], 0x10
and eax, 0xff
mov dword [0x409498], eax
shl eax, 8
add eax, dword [0x40949c]
mov dword [0x409494], eax
call fcn.00404360
test eax, eax
jne 0x401e14
push 0x1c
call fcn.00401f40
add esp, 4
mov dword [ebp - 4], 0
call fcn.00404180
call fcn.00404170
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x42ba0c], eax
call fcn.00403d20
mov dword [0x4091fc], eax
test eax, eax
je 0x401e47
cmp dword [0x42ba0c], 0
jne 0x401e51
push 0xffffffffffffffff
call fcn.004035c0
add esp, 4
call fcn.00403aa0
call fcn.004039b0
call fcn.00403590
mov esi, dword [0x42ba0c]
mov al, byte [esi]
cmp al, 0x22
je 0x401e78
cmp al, 0x20
jbe 0x401ea5
inc esi
cmp byte [esi], 0x20
ja 0x401e70
jmp 0x401ea5
inc esi
cmp byte [esi], 0x22
je 0x401ea4
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x401e9f
xor eax, eax
mov al, bl
push eax
call fcn.00403950
add esp, 4
test eax, eax
je 0x401e99
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x401e81
cmp byte [esi], 0x22
jne 0x401ea5
inc esi
cmp byte [esi], 0
je 0x401eb5
cmp byte [esi], 0x20
ja 0x401eb5
inc esi
cmp byte [esi], 0
jne 0x401eaa
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x401ed9
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.004035c0
jmp 0x401f1a
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403600
Capabilities:
Terminate process

Disassembly:
cmp dword [0x4094cc], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x40361e
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4094c8], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x4094c4], bl
jne 0x403678
cmp dword [0x42ba08], 0
je 0x403666
mov edi, dword [0x42ba04]
sub edi, 4
cmp edi, dword [0x42ba08]
jb 0x403666
mov eax, dword [edi]
test eax, eax
je 0x40365b
call eax
sub edi, 4
cmp edi, dword [0x42ba08]
jae 0x403653
push 0x40901c
push 0x409014
call fcn.004036b0
add esp, 8
push 0x409024
push 0x409020
call fcn.004036b0
add esp, 8
test ebx, ebx
jne 0x40369f
mov dword [0x4094cc], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x403d20
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x409570], ebx
jne 0x403d6f
call esi
cmp eax, ebx
mov edi, eax
je 0x403d4d
mov dword [0x409570], 1
jmp 0x403d6f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x403d65
mov dword [0x409570], 2
jmp 0x403d6f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x409570], 1
jne 0x403e1e
test edi, edi
jne 0x403d92
call esi
mov edi, eax
test edi, edi
jne 0x403d92
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x403dac
add esi, 2
cmp word [esi], 0
jne 0x403d9a
add esi, 2
cmp word [esi], 0
jne 0x403d9a
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x403e0d
push ebp
call fcn.00402300
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x403e0d
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x403dfc
push ebx
call fcn.00402050
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x409570], 2
jne 0x403ea2
test ebx, ebx
jne 0x403e41
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x403e41
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x403e56
inc ebp
cmp byte [ebp], 0
jne 0x403e48
inc ebp
cmp byte [ebp], 0
jne 0x403e48
sub ebp, ebx
inc ebp
push ebp
call fcn.00402300
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x403e7b
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x4044c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x4097a0
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x4044e7
add eax, 8
inc ecx
cmp eax, 0x409830
jb 0x4044d8
cmp dword [ecx*8 + 0x4097a0], edx
lea ebx, [ecx*8]
jne 0x4046ab
cmp dword [0x409208], 1
je 0x404667
cmp dword [0x409208], 0
jne 0x40451e
cmp dword [0x40920c], 1
je 0x404667
cmp edx, 0xfc
je 0x4046ab
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x40455b
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40459f
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x4083bc
push ebp
call fcn.00404f50
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40839c
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x4097a4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00406150
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x42b900], 0
je 0x40467d
mov eax, dword [0x42b900]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x404687
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x4097a4]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x405080
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x42ba00], edx
push ebx
push esi
push edi
push ebp
jbe 0x405287
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x42b900
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x405287
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x4050e9
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x4050fa
push 2
push 0
push edx
call fcn.004052b0
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x405196
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x4051cf
lea edi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40515d
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x40514b
mov byte [edi], 0xd
inc esi
inc edi
mov byte [edi], al
inc edi
mov eax, edi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x405132
lea eax, [esp + 0x24]
push 0
sub edi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push edi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4051c5
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, edi
jge 0x40511d
jmp 0x4051cf
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4051c5
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x4051cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x405276
cmp dword [esp + 0x10], 0
je 0x405228
cmp dword [esp + 0x10], 5
jne 0x40520b
mov dword [0x409484], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x409488], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.00406290
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x405252
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x405252
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x409484], 0x1c
mov dword [0x409488], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x409484], 9
mov dword [0x409488], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x4011b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0x20
push 0xff
push 0x427968
call fcn.00404be0
add esp, 0xc
push 0x41f220
push 0x41f224
call fcn.00408987
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x401291
mov eax, dword [ebp - 4]
push eax
push 1
push 0x20
push 0x427968
call fcn.00408b84
add esp, 0x10
mov ecx, dword [ebp - 4]
push ecx
push 1
push 1
push 0x427988
call fcn.00408b84
add esp, 0x10
mov edx, dword [ebp - 4]
push edx
push 1
push 5
push section..data
call fcn.00408b84
add esp, 0x10
mov eax, dword [ebp - 4]
push eax
push 1
push 1
push 0x427989
call fcn.00408b84
add esp, 0x10
mov ecx, dword [ebp - 4]
push ecx
push 1
push 1
push 0x42798a
call fcn.00408b84
add esp, 0x10
mov edx, dword [ebp - 4]
push edx
push 1
push 1
push 0x42798b
call fcn.00408b84
add esp, 0x10
movzx eax, byte [0x42798b]
test eax, eax
je 0x401285
mov ecx, dword [ebp - 4]
push ecx
push 1
push 4
push 0x42798c
call fcn.00408b84
add esp, 0x10
mov edx, dword [ebp - 4]
push edx
call fcn.004088a0
add esp, 4
mov esp, ebp
pop ebp
ret

Function at 0x402060
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x427060]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x18]
push ecx
push 0x13
push 0xd
mov edx, dword [0x4279cc]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp + 8]
push eax
push 0x41f21c
lea ecx, [ebp - 0x18]
push ecx
call fcn.00402260
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040404e
mov esp, ebp
pop ebp
ret

Function at 0x4038a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
mov eax, dword [0x427060]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0040f8f3
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
push 1
push 0x40
lea edx, [ebp - 0x6c]
push edx
call fcn.00408b84
add esp, 0x10
push 1
mov eax, dword [ebp - 0x30]
sub eax, 0x40
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f8f3
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
push 1
push 0x18
lea eax, [ebp - 0x164]
push eax
call fcn.00408b84
add esp, 0x10
push 1
movzx ecx, word [ebp - 0x150]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0040f8f3
add esp, 0xc
mov ax, word [ebp - 0x15e]
mov word [ebp - 0x16c], ax
xor ecx, ecx
mov word [ebp - 0x168], cx
jmp 0x403944
mov dx, word [ebp - 0x168]
add dx, 1
mov word [ebp - 0x168], dx
movzx eax, word [ebp - 0x168]
movzx ecx, word [ebp - 0x16c]
cmp eax, ecx
jge 0x40398a
mov edx, dword [ebp + 8]
push edx
push 1
push 0x28
lea eax, [ebp - 0x2c]
push eax
call fcn.00408b84
add esp, 0x10
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 0x20]
jb 0x403988
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x24]
cmp dword [ebp + 0xc], edx
jae 0x403988
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x18]
jmp 0x40398c
jmp 0x403932
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040404e
mov esp, ebp
pop ebp
ret
Function at 0x4039a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
mov eax, dword [0x427060]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0040f8f3
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
push 1
push 0x40
lea edx, [ebp - 0x6c]
push edx
call fcn.00408b84
add esp, 0x10
push 1
mov eax, dword [ebp - 0x30]
sub eax, 0x40
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f8f3
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
push 1
push 0x18
lea eax, [ebp - 0x164]
push eax
call fcn.00408b84
add esp, 0x10
push 1
movzx ecx, word [ebp - 0x150]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0040f8f3
add esp, 0xc
mov ax, word [ebp - 0x15e]
mov word [ebp - 0x16c], ax
xor ecx, ecx
mov word [ebp - 0x168], cx
jmp 0x403a44
mov dx, word [ebp - 0x168]
add dx, 1
mov word [ebp - 0x168], dx
movzx eax, word [ebp - 0x168]
movzx ecx, word [ebp - 0x16c]
cmp eax, ecx
jge 0x403abf
mov edx, dword [ebp + 8]
push edx
push 1
push 0x28
lea eax, [ebp - 0x2c]
push eax
call fcn.00408b84
add esp, 0x10
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040f930
add esp, 4
test eax, eax
je 0x403aa6
push 8
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x2c]
push eax
call fcn.00404d3a
add esp, 0xc
test eax, eax
je 0x403aa6
push 8
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x2c]
push edx
call fcn.0040f5a0
add esp, 0xc
test eax, eax
jne 0x403aba
push 1
push 0xffffffffffffffd8
mov eax, dword [ebp + 8]
push eax
call fcn.0040f8f3
add esp, 0xc
mov al, 1
jmp 0x403ac1
jmp 0x403a32
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040404e
mov esp, ebp
pop ebp
ret

Function at 0x403b20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x427060]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0040f8f3
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
push 1
push 0x40
lea edx, [ebp - 0x44]
push edx
call fcn.00408b84
add esp, 0x10
push 1
mov eax, dword [ebp - 8]
sub eax, 0x40
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f8f3
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
push 1
push 0x18
lea eax, [ebp - 0x13c]
push eax
call fcn.00408b84
add esp, 0x10
movzx ecx, word [ebp - 0x128]
test ecx, ecx
jle 0x403bf2
push 1
push 2
mov edx, dword [ebp + 8]
push edx
call fcn.0040f8f3
add esp, 0xc
push 1
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.0040f8f3
add esp, 0xc
push 1
push 1
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f8f3
add esp, 0xc
push 1
push 4
mov edx, dword [ebp + 8]
push edx
call fcn.0040f8f3
add esp, 0xc
push 1
push 4
mov eax, dword [ebp + 8]
push eax
call fcn.0040f8f3
add esp, 0xc
push 1
push 4
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f8f3
add esp, 0xc
mov al, 1
jmp 0x403bf4
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040404e
mov esp, ebp
pop ebp
ret
Function at 0x403c60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x427060]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x144], 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0040f8f3
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
push 1
push 0x40
lea edx, [ebp - 0x44]
push edx
call fcn.00408b84
add esp, 0x10
push 1
mov eax, dword [ebp - 8]
sub eax, 0x40
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f8f3
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
push 1
push 0x18
lea eax, [ebp - 0x13c]
push eax
call fcn.00408b84
add esp, 0x10
movzx ecx, word [ebp - 0x128]
test ecx, ecx
jle 0x403d4a
push 1
push 0x68
mov edx, dword [ebp + 8]
push edx
call fcn.0040f8f3
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
push 1
push 4
lea ecx, [ebp - 0x140]
push ecx
call fcn.00408b84
add esp, 0x10
mov edx, dword [ebp + 8]
push edx
push 1
push 4
lea eax, [ebp - 0x144]
push eax
call fcn.00408b84
add esp, 0x10
push 0
mov ecx, dword [ebp - 0x140]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004038a0
add esp, 8
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.0040f8f3
add esp, 0xc
mov eax, dword [ebp - 0x144]
jmp 0x403d4c
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040404e
mov esp, ebp
pop ebp
ret

Function at 0x4048a7
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4048e6
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4048e6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4048e6
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4048e6
cmp dword [ecx + 0x74], 0xe
jbe 0x4048e6
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x40fdcd
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00404060
mov eax, dword [0x427060]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00411a17
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x40fe0f
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x40ff6b
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0041e7f0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x427f80]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00415e23
mov ecx, dword [esi*4 + 0x427f80]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x40ff64
cmp eax, dword [edi + ecx + 0x24]
jne 0x40ff64
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ff64
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00415e23
add esp, 0x14
test edx, edx
jl 0x40ff64
jg 0x40feda
test eax, eax
jb 0x40ff64
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x40ff64
jl 0x40fef4
cmp dword [ebp - 0x1008], eax
ja 0x40ff64
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x40ff12
test ebx, ebx
je 0x40ff4b
cmp ecx, edi
jae 0x40ff4b
mov al, byte [ecx]
cmp al, 0xd
jne 0x40ff2c
lea eax, [edi - 1]
cmp ecx, eax
jae 0x40ff38
cmp byte [ecx + 1], 0xa
jne 0x40ff38
inc ecx
jmp 0x40ff38
movzx eax, al
movsx eax, byte [eax + 0x427238]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x40ff12
cmp edx, ebx
jne 0x40ff12
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x40ff69
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040404e
leave
ret
Function at 0x412c8d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x427f80]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x412ccd
cmp byte [ebx], 0xa
jne 0x412ccd
or byte [eax + edi + 0x28], 4
jmp 0x412cd2
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x412dd0
mov al, byte [edx]
cmp al, 0x1a
je 0x412db2
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x412d01
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x412d26
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x412d30
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x412ce3
jmp 0x412dd0
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x412dad
cmp dword [ebp - 0xc], 0
je 0x412dad
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x427f80]
test byte [eax + edi + 0x28], 0x48
je 0x412d87
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x412d72
mov byte [esi], dl
jmp 0x412d83
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x427f80]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x412dd0
cmp byte [ebp - 1], 0xa
jne 0x412d96
cmp esi, ebx
jne 0x412d96
mov byte [esi], 0xa
jmp 0x412dcf
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00415e41
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x412dd0
mov byte [esi], 0xd
jmp 0x412dcf
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x427f80]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x412dcc
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x412dd0
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret