joyce8/EMBER2024-capa huggingface dataset:
Function at 0x449ea6
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
push ebx
push esi
push edi
xor eax, eax
xor esi, esi
mov word [ebp - 0x224], si
mov ecx, 0x84
lea edi, [ebp - 0x222]
rep stosd dword es:[edi], eax
lea eax, [ebp - 8]
push eax
push str.SoftwareSimonTathamPuTTY
mov ebx, 0x212
push 0x80000001
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
xor edi, edi
inc edi
test eax, eax
jne 0x449f4a
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push str.RandSeedFile
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x449f14
cmp dword [ebp - 0x10], edi
je 0x449f1b
mov byte [ebp - 0x224], 0
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x224], 0
je 0x449f4a
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x224]
push eax
lea esi, [ebp - 4]
call fcn.00449e0e
test eax, eax
pop ecx
jne 0x44a098
xor esi, esi
cmp dword [0x4770bc], esi
jne 0x449f85
push str.shell32.dll
call fcn.004464b2
cmp eax, esi
pop ecx
mov dword [0x4770c0], eax
je 0x449f79
push str.SHGetFolderPathA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4770b8], eax
jmp 0x449f7f
mov dword [0x4770b8], esi
mov dword [0x4770bc], edi
mov eax, dword [0x4770b8]
cmp eax, esi
mov edi, str.PUTTY.RND
je 0x44a011
lea ecx, [ebp - 0x224]
push ecx
push esi
push esi
push 0x1c
push esi
call eax
test eax, eax
jl 0x449fd1
lea eax, [ebp - 0x224]
push edi
push eax
call fcn.0044df00
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x224]
push eax
lea esi, [ebp - 4]
call fcn.00449e0e
add esp, 0xc
test eax, eax
jne 0x44a098
xor esi, esi
lea eax, [ebp - 0x224]
push eax
push esi
push esi
push 0x1a
push esi
call dword [0x4770b8]
test eax, eax
jl 0x44a011
lea eax, [ebp - 0x224]
push edi
push eax
call fcn.0044df00
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x224]
push eax
lea esi, [ebp - 4]
call fcn.00449e0e
add esp, 0xc
test eax, eax
jne 0x44a098
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push ebx
lea eax, [ebp - 0x224]
push eax
push str.HOMEDRIVE
call esi
mov ecx, ebx
sub ecx, eax
push ecx
lea eax, [ebp + eax - 0x224]
push eax
push str.HOMEPATH
call esi
test eax, eax
je 0x44a064
lea eax, [ebp - 0x224]
push edi
push eax
call fcn.0044df00
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x224]
push eax
lea esi, [ebp - 4]
call fcn.00449e0e
add esp, 0xc
test eax, eax
jne 0x44a098
push ebx
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x224]
push edi
push eax
call fcn.0044df00
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x224]
push eax
lea esi, [ebp - 4]
call fcn.00449e0e
add esp, 0xc
test eax, eax
je 0x44a09d
mov eax, dword [ebp - 4]
jmp 0x44a0a0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x44a0a5
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
push ebx
push 1
call fcn.00449ea6
mov ebx, eax
cmp ebx, 0xffffffff
pop ecx
je 0x44a100
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov edi, 0x400
jmp 0x44a0e2
cmp dword [ebp - 4], 0
je 0x44a0f7
push dword [ebp - 4]
lea eax, [ebp - 0x404]
push eax
call dword [ebp + 8]
pop ecx
pop ecx
push 0
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp - 0x404]
push eax
push ebx
call esi
test eax, eax
jne 0x44a0cd
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x44a103
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 2
call fcn.00449ea6
mov esi, eax
cmp esi, 0xffffffff
pop ecx
je 0x44a131
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
leave
ret
Function at 0x44a380
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
push edi
mov edi, 0x105
jmp 0x44a3d2
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10c]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x44a3c4
push dword [ebp - 4]
call fcn.0044a380
pop ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x10c]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push edi
lea eax, [ebp - 0x10c]
push eax
push 0
push ebx
call esi
test eax, eax
je 0x44a39c
pop edi
pop esi
pop ebx
leave
ret

Function at 0x44a3e8
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
push edi
push 0
call fcn.00449ea6
pop ecx
call fcn.00446304
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea eax, [ebp - 4]
push eax
push str.SoftwareSimonTathamPuTTY
mov edi, 0x80000001
push edi
call esi
test eax, eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x44a430
push dword [ebp - 4]
call fcn.0044a380
pop ecx
push dword [ebp - 4]
call ebx
lea eax, [ebp - 4]
push eax
push str.SoftwareSimonTatham
push edi
call esi
test eax, eax
jne 0x44a496
push 0x4574e0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push 0x105
lea eax, [ebp - 0x110]
push eax
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
push dword [ebp - 4]
mov dword [ebp - 8], eax
call ebx
cmp dword [ebp - 8], 0
je 0x44a496
lea eax, [ebp - 4]
push eax
push str.Software
push edi
call esi
test eax, eax
jne 0x44a496
push str.SimonTatham
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x44af76
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
cmp dword [ebp + 0x10], 0
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, 0x104
je 0x44afa9
lea eax, [ebp - 0x104]
push eax
push esi
call edi
test eax, eax
je 0x44afa5
cmp eax, esi
jb 0x44afa9
and dword [ebp + 0x10], 0
mov ebx, dword [ebp + 8]
test ebx, ebx
mov eax, dword [ebp + 0xc]
mov dword [eax], 0x4c
je 0x44afc2
cmp byte [ebx], 0
je 0x44afc2
mov ecx, ebx
jmp 0x44afc4
xor ecx, ecx
cmp dword [ebp + 0x14], 0
mov dword [eax + 0x2c], ecx
push eax
je 0x44afd6
call dword [sym.imp.comdlg32.dll_GetSaveFileNameA]
jmp 0x44afdc
call dword [sym.imp.comdlg32.dll_GetOpenFileNameA]
test ebx, ebx
mov dword [ebp + 0xc], eax
je 0x44aff2
push ebx
push esi
call edi
test eax, eax
je 0x44afef
cmp eax, esi
jb 0x44aff2
mov byte [ebx], 0
cmp dword [ebp + 0x10], 0
pop edi
pop esi
pop ebx
je 0x44b008
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [ebp + 0xc]
leave
ret
Function at 0x44ee6e
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x477140], esi
push edi
jne 0x44ee8e
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 [0x47713c], esi
mov byte [0x477138], al
jne 0x44eef4
mov ecx, dword [0x4778ac]
test ecx, ecx
je 0x44eed5
mov eax, dword [0x4778a8]
sub eax, 4
cmp eax, ecx
jmp 0x44eece
mov eax, dword [eax]
test eax, eax
je 0x44eec0
call eax
mov eax, dword [0x4778a8]
sub eax, 4
cmp eax, dword [0x4778ac]
mov dword [0x4778a8], eax
jae 0x44eeb8
mov eax, 0x473020
mov esi, 0x473028
cmp eax, esi
mov edi, eax
jae 0x44eef4
mov eax, dword [edi]
test eax, eax
je 0x44eeed
call eax
add edi, 4
cmp edi, esi
jb 0x44eee5
mov eax, 0x47302c
mov esi, 0x473030
cmp eax, esi
mov edi, eax
jae 0x44ef13
mov eax, dword [edi]
test eax, eax
je 0x44ef0c
call eax
add edi, 4
cmp edi, esi
jb 0x44ef04
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x44ef2d
push dword [ebp + 8]
mov dword [0x477140], 1
call fcn.0044edd4
pop ebp
ret

Function at 0x44f92a
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x477164], ebx
push esi
push edi
jne 0x44f9aa
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x44f9e5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x470484
push edi
call esi
test eax, eax
mov dword [0x477164], eax
je 0x44f9e5
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x477168], eax
call esi
cmp dword [0x477100], 2
mov dword [0x47716c], eax
jne 0x44f9aa
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x477174], eax
je 0x44f9aa
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x477170], eax
mov eax, dword [0x477170]
test eax, eax
je 0x44f9ef
call eax
test eax, eax
je 0x44f9d6
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x477174]
test eax, eax
je 0x44f9d6
test byte [ebp - 8], 1
jne 0x44f9ef
cmp dword [0x47710c], 4
jb 0x44f9e9
or byte [ebp + 0x12], 0x20
jmp 0x44fa0e
xor eax, eax
jmp 0x44fa1e
or byte [ebp + 0x12], 4
jmp 0x44fa0e
mov eax, dword [0x477168]
test eax, eax
je 0x44fa0e
call eax
mov ebx, eax
test ebx, ebx
je 0x44fa0e
mov eax, dword [0x47716c]
test eax, eax
je 0x44fa0e
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x477164]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x450c4f
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x477784]
mov eax, dword [0x473bf0]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x450e15
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x4777a0]
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 0x450e15
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x450cb9
xor eax, eax
jmp 0x450e29
test al, 0x20
je 0x450cca
push 2
push edi
push edi
push ecx
call fcn.004559fc
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x450d9f
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x450de6
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x450d2c
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x450d1d
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 0x450cff
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 0x450d6c
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x450d78
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x450cf3
jmp 0x450d7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x450e10
cmp dword [ebp + 0x3a4], edi
je 0x450de6
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x450dd8
mov dword [0x4770f8], eax
jmp 0x450e1c
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 0x450dca
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x450d7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x450d7a
push dword [ebp + 0x3a4]
call fcn.0045410d
pop ecx
jmp 0x450e26
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x450dfe
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x450cb2
mov dword [0x4770f4], 0x1c
mov dword [0x4770f8], edi
jmp 0x450e26
sub eax, dword [ebp - 0x7c]
jmp 0x450e29
and dword [0x4770f8], 0
mov dword [0x4770f4], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0044fbf6
add ebp, 0x39c
leave
ret
Function at 0x45114e
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.0044ed20
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4511e9
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 [0x477100]
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 0x4511e9
cmp eax, 1
je 0x45120a
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 0x4511e9
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4511b6
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4511e5
xor eax, eax
inc eax
jmp 0x451229
cmp edi, eax
jae 0x4511ed
xor eax, eax
jmp 0x451229
cmp eax, esi
jae 0x4511f4
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 [0x477100]
jmp 0x45120d
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 0x4534df
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x473bf0]
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 + 0x473ce0]
je 0x453514
inc eax
cmp eax, 0x13
jb 0x453505
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x473ce0]
jne 0x45363a
mov eax, dword [0x47714c]
cmp eax, 1
je 0x453612
cmp eax, edx
jne 0x453544
cmp dword [0x473be4], 1
je 0x453612
cmp ecx, 0xfc
je 0x45363a
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 0x45357a
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0044def0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0044c220
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4535ae
mov eax, edi
push eax
call fcn.0044c220
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x46fc84
push edi
call fcn.0044e980
add esp, 0x10
push edi
call fcn.0044c220
push dword [esi + 0x473ce4]
mov ebx, eax
call fcn.0044c220
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0044ed20
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0044def0
push edi
push ebx
call fcn.0044df00
push 0x46fc80
push ebx
call fcn.0044df00
push dword [esi + 0x473ce4]
push ebx
call fcn.0044df00
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0044f92a
add esp, 0x2c
jmp 0x45363a
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x473ce4]
push dword [esi]
call fcn.0044c220
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.0044fbf6
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x45368f
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 [0x477784]
push edi
jae 0x453864
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x4777a0]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x453864
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x45373a
test dl, 2
jne 0x45373a
test dl, 0x48
je 0x453704
cmp byte [eax + 5], 0xa
je 0x453704
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 0x45374d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x453735
mov dword [0x4770f8], ecx
jmp 0x45386b
cmp eax, 0x6d
jne 0x453741
xor eax, eax
jmp 0x453878
push eax
call fcn.0045410d
pop ecx
jmp 0x453875
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x45385f
test eax, eax
je 0x453774
cmp byte [ebx], 0xa
jne 0x453774
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x45377d
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 0x453859
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x453849
cmp al, 0xd
je 0x4537af
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x45383b
dec ecx
cmp dword [ebp - 8], ecx
jae 0x4537c9
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x4537c4
add dword [ebp - 8], 2
jmp 0x45381d
mov dword [ebp - 8], eax
jmp 0x453837
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 0x4537f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x453837
cmp dword [ebp - 0x10], 0
je 0x453837
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x453812
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x45381d
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x45383a
cmp ebx, dword [ebp + 0xc]
jne 0x453822
cmp byte [ebp - 1], 0xa
jne 0x453822
mov byte [ebx], 0xa
jmp 0x45383a
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004553c1
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x45383b
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x453793
jmp 0x453859
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x453859
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 0x453878
and dword [0x4770f8], 0
mov dword [0x4770f4], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x455b8a
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 0x455bb8
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 0x455bbf
cmp ebx, dword [eax + 4]
jae 0x455bbf
xor eax, eax
jmp 0x455daf
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x455bd0
xor eax, eax
inc eax
jmp 0x455dae
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x455be6
cmp ecx, edx
jae 0x455d2b
cmp dword [eax + 4], 0
je 0x455bef
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x455bd7
cmp dword [ebp + 8], 0
je 0x455c11
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x455d2b
cmp eax, esi
jae 0x455d2b
mov eax, dword [0x4773e8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x455c36
cmp dword [esi*4 + 0x4773f0], edi
je 0x455d2f
inc esi
cmp esi, eax
jl 0x455c24
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x455dab
cmp dword [ebp - 8], 0x1000000
jne 0x455dab
test byte [ebp - 0xc], 0xcc
je 0x455cb4
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x455dab
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x455dab
cmp word [eax + 0x18], 0x10b
jne 0x455dab
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x455dab
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x455cb4
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x455cb4
test byte [ecx + 0x27], 0x80
jne 0x455d2b
push 1
push 0x477430
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x455bc8
mov ecx, dword [0x4773e8]
test ecx, ecx
mov edx, ecx
jle 0x455ce8
lea eax, [ecx*4 + 0x4773ec]
cmp dword [eax], edi
je 0x455ce8
dec edx
sub eax, 4
test edx, edx
jg 0x455cdc
test edx, edx
jne 0x455d19
push 0xf
pop ebx
cmp ecx, ebx
jg 0x455cf5
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x455d0d
lea eax, [edx*4 + 0x4773f0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x455cfb
cmp ecx, 0x10
jge 0x455d19
inc ecx
mov dword [0x4773e8], ecx
push 0
push 0x477430
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x455bc8
xor eax, eax
jmp 0x455dae
test esi, esi
jle 0x455bc8
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x477430
call ebx
test eax, eax
jne 0x455bc8
cmp dword [esi*4 + 0x4773f0], edi
je 0x455d85
mov eax, dword [0x4773e8]
lea esi, [eax - 1]
test esi, esi
jl 0x455d73
cmp dword [esi*4 + 0x4773f0], edi
je 0x455d6f
dec esi
jns 0x455d63
test esi, esi
jge 0x455d83
cmp eax, 0x10
jge 0x455d7e
inc eax
mov dword [0x4773e8], eax
lea esi, [eax - 1]
jmp 0x455d85
je 0x455d9d
xor ecx, ecx
test esi, esi
jl 0x455d9d
lea eax, [ecx*4 + 0x4773f0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x455d8b
push 0
push 0x477430
call ebx
jmp 0x455bc8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret