joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402300
Capabilities:
Create http request

Disassembly:
push ebx
push esi
push 0
push 0
push 0
push 0
push str.HTTP
mov esi, ecx
xor bl, bl
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esi], eax
je 0x402378
mov eax, dword [esp + 0xc]
push edi
push eax
push 0
mov ecx, esi
call fcn.00402150
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov bl, al
cmp bl, 1
jne 0x40235d
mov ecx, dword [esp + 0x14]
push ecx
push 0
mov ecx, esi
call fcn.00402200
mov bl, al
cmp bl, 1
jne 0x40235d
mov edx, dword [esi + 4]
push edx
call edi
mov dword [esi + 4], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x402367
push eax
call edi
mov esi, dword [esi]
test esi, esi
je 0x402370
push esi
call edi
pop edi
pop esi
mov al, bl
pop ebx
ret 8
pop esi
mov al, bl
pop ebx
ret 8

Function at 0x402380
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x10], ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret

Function at 0x4033c0
Capabilities:
Enumerate processes
Terminate process
Terminate process by name

Disassembly:
sub esp, 0x138
mov eax, dword [0x43b3f0]
push esi
push 0
push 2
mov dword [esp + 0x140], eax
mov dword [esp + 0x10], 0
call sub.KERNEL32.DLL_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 4], esi
jne 0x403407
xor eax, eax
pop esi
mov ecx, dword [esp + 0x134]
call fcn.0040fed5
add esp, 0x138
ret 4
lea eax, [esp + 0x10]
push eax
push esi
mov dword [esp + 0x18], 0x128
call sub.KERNEL32.DLL_Process32First
test eax, eax
je 0x4034bf
push ebx
mov ebx, dword [esp + 0x144]
push ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_OpenProcess]
push edi
mov edi, str.ISecu.exe
lea esi, [esp + 0x40]
mov ecx, 0xa
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4034a1
test ebx, ebx
jne 0x403454
mov dword [esp + 0x14], 1
jmp 0x4034a1
cmp ebx, 1
jne 0x4034a1
mov eax, dword [esp + 0x24]
push eax
push 0
push 0x1f0fff
mov dword [esp + 0x24], 0
call ebp
mov esi, eax
test esi, esi
je 0x4034a1
lea ecx, [esp + 0x18]
push ecx
push esi
call dword [sym.imp.KERNEL32.DLL_GetExitCodeProcess]
mov edx, dword [esp + 0x18]
push edx
push esi
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
test eax, eax
je 0x40349a
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push ecx
call sub.KERNEL32.DLL_Process32Next
test eax, eax
jne 0x403432
mov esi, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [esp + 0x138]
mov eax, dword [esp + 8]
pop esi
call fcn.0040fed5
add esp, 0x138
ret 4
Function at 0x4037d0
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x42c73b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb0
push esi
push edi
mov esi, ecx
mov dword [esp + 0x10], 0x90
mov dword [esp + 0x14], 0x91
mov dword [esp + 0x18], 0x92
mov dword [esp + 0x1c], 0x93
mov dword [esp + 0x20], 0x94
mov dword [esp + 0x24], 0x95
mov dword [esp + 0x28], 0x96
mov dword [esp + 0x2c], 0x97
mov dword [esp + 0x30], 0x98
mov dword [esp + 0x34], 0x99
mov dword [esp + 0x38], 0x9a
mov dword [esp + 0x3c], 0x9b
mov dword [esp + 0x40], 0x9c
mov dword [esp + 0x44], 0x9d
mov dword [esp + 0x48], 0x9e
mov dword [esp + 0x4c], 0x9f
mov dword [esp + 0x50], 0xa0
mov dword [esp + 0x54], 0xa1
mov dword [esp + 0x58], 0xa2
mov dword [esp + 0x5c], 0xa3
mov dword [esp + 0x60], 0xa4
mov dword [esp + 0x64], 0xa5
mov dword [esp + 0x68], 0xa6
mov dword [esp + 0x6c], 0xa7
mov dword [esp + 0x70], 0xa8
mov dword [esp + 0x74], 0xa9
mov dword [esp + 0x78], 0xaa
mov dword [esp + 0x7c], 0xab
mov dword [esp + 0x80], 0xac
mov dword [esp + 0x84], 0xad
mov dword [esp + 0x88], 0xae
mov dword [esp + 0x8c], 0xaf
mov dword [esp + 0x90], 0xb0
mov dword [esp + 0x94], 0xb1
mov dword [esp + 0x98], 0xb2
mov dword [esp + 0x9c], 0xb3
mov dword [esp + 0xa0], 0xb4
mov dword [esp + 0xa4], 0xb5
mov dword [esp + 0xa8], 0xb6
mov dword [esp + 0xac], 0xb7
mov dword [esp + 0xb0], 0xb8
mov dword [esp + 0xb4], 0xb9
mov dword [esp + 0xc], 0
mov dword [esp + 8], vtable.CBitmap.0
mov eax, dword [esp + 0xc8]
mov edi, dword [esp + eax*4 + 0x10]
mov dword [esp + 0xc0], 0
call fcn.00428809
mov eax, dword [eax + 0xc]
movzx ecx, di
push ecx
push eax
call dword [sym.imp.USER32.dll_LoadBitmapA]
push eax
lea ecx, [esp + 0xc]
call fcn.00425733
push 0
push 0x20e
push 1
lea ecx, [esi + 0x134]
call fcn.0041df4e
mov edx, dword [esp + 0xc]
mov eax, dword [esi + 0x150]
push edx
push 0
push 0x172
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
lea ecx, [esp + 8]
call fcn.0042578a
lea ecx, [esp + 8]
mov dword [esp + 0xc0], 0xffffffff
mov dword [esp + 8], vtable.CGdiObject.0
call fcn.0042578a
mov ecx, dword [esp + 0xb8]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0xbc
ret 4
Function at 0x4048f0
Capabilities:
Check if file exists
Create directory
Create thread

Disassembly:
sub esp, 0x18
push esi
mov esi, ecx
push str.ISECU
mov dword [0x43ef20], esi
call fcn.0041df78
push 0x43e55c
mov dword [esi + 0x8c], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40492b
push eax
push 0x43d820
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryA]
call fcn.00428809
mov eax, dword [eax + 0xc]
push 0x81
push eax
call dword [sym.imp.USER32.dll_LoadBitmapA]
push eax
lea ecx, [esi + 0x7c]
call fcn.00425733
mov ecx, dword [esi + 0x80]
lea eax, [esp + 4]
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push 6
push ecx
push eax
push 0
push 0
mov dword [esi + 0x88], ecx
push 0
mov ecx, esi
mov dword [esi + 0x84], eax
call fcn.0041e185
push 0x43a1b0
push 0x43a1a0
push esi
call fcn.00402f80
push 0x43a1d0
push 0x43a1c0
push esi
call fcn.00402f80
add esp, 0x18
mov ecx, esi
call fcn.004040a0
cmp eax, 1
jne 0x4049c9
lea edx, [esi + 0x78]
push edx
push 0
push esi
push 0x403a20
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [esi + 0x74], eax
pop esi
add esp, 0x18
ret

Function at 0x404bc0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
xor eax, eax
push edi
mov dword [0x43d4f8], eax
mov dword [0x43d4fc], eax
mov dword [0x43d500], eax
push eax
push 0x80
push 3
push eax
push eax
push SysReAllocStringLen
push 0x43e96c
mov dword [0x43d504], eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x404c33
push esi
lea ecx, [esp + 8]
push ecx
push edi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
push 0
lea edx, [esp + 0xc]
push edx
push eax
push 0x43d4f8
push edi
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov esi, eax
dec esi
neg esi
sbb esi, esi
push edi
inc esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, esi
pop esi
pop edi
pop ecx
ret
xor eax, eax
pop edi
pop ecx
ret

Function at 0x404c40
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push 0x43e96c
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x404c8e
push 0
lea eax, [esp + 8]
push eax
push 0x10
push 0x43d4f8
push esi
mov dword [esp + 0x18], 0x10
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x404c8e
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop esi
pop ecx
ret
Function at 0x404ca0
Capabilities:
Check if file exists
Copy file
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x23c
mov eax, dword [0x43b3f0]
push ebx
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push esi
push edi
push 0x43e044
mov dword [esp + 0x248], eax
call ebx
test eax, eax
mov esi, dword [sym.imp.KERNEL32.DLL_DeleteFileA]
mov edi, dword [sym.imp.KERNEL32.DLL_CopyFileA]
je 0x404cf4
push 0x43e55c
call esi
push 1
push 0x43e55c
push 0x43e044
call edi
push 0x43e044
call esi
push 0x43df40
call ebx
test eax, eax
je 0x404d1b
push 0x43e458
call esi
push 1
push 0x43e458
push 0x43df40
call edi
push 0x43df40
call esi
push 0x43e350
call ebx
test eax, eax
je 0x404d42
push 0x43e868
call esi
push 1
push 0x43e868
push 0x43e350
call edi
push 0x43e350
call esi
push 0x43e24c
call ebx
test eax, eax
je 0x404d69
push 0x43e764
call esi
push 1
push 0x43e764
push 0x43e24c
call edi
push 0x43e24c
call esi
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x8b
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x43d820
stosb byte es:[edi], al
lea eax, [esp + 0x14]
push str._supdate2_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
call ebx
test eax, eax
je 0x404dac
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryA]
mov ecx, dword [esp + 0x244]
call fcn.0040fed5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406cc0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x406d13
call fcn.00428809
mov edi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
cmp eax, ebx
je 0x406d13
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x406d09
xor eax, eax
jmp 0x406e2c
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x406d43
mov eax, dword [esi]
push edi
push dword [ebp - 4]
mov ecx, esi
push ebx
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x406d43
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_FreeResource]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x406e29
mov ecx, dword [eax + 0x40]
and dword [ebp + 0xc], 0
test ecx, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 8], ecx
je 0x406d70
lea ecx, [eax + 0x3c]
lea eax, [ebp + 8]
push eax
call fcn.0040662d
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [edi + 8], eax
mov dword [ebp - 4], eax
jbe 0x406e29
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x406db9
mov ecx, dword [ecx + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x406db9
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 8], eax
je 0x406db3
mov ecx, dword [ebx + 0x48]
lea eax, [ebp + 8]
add ecx, 0x3c
push eax
call fcn.0040662d
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x406e19
and dword [ebp + 0xc], 0
jmp 0x406e19
mov ecx, dword [edi + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x406e19
push 0xc
call fcn.0041de2d
mov esi, eax
test esi, esi
pop ecx
je 0x406dfb
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x1c]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0x10]
mov dword [esi], eax
jmp 0x406dfd
xor esi, esi
mov ecx, dword [ebx + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x406e14
push dword [ebp - 8]
call fcn.0041d72f
jmp 0x406e19
call fcn.0041d706
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [edi + 8]
mov dword [ebp - 4], eax
jb 0x406d7e
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x410c86
Capabilities:
Terminate process

Disassembly:
push 8
push 0x431ba0
call fcn.0041201c
push 8
call fcn.004163d3
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x441064], esi
jne 0x410cba
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
mov dword [0x441060], esi
mov al, byte [ebp + 0x10]
mov byte [0x44105c], al
cmp dword [ebp + 0xc], edi
jne 0x410d04
cmp dword [0x44292c], edi
je 0x410cf4
mov eax, dword [0x442928]
sub eax, 4
mov dword [0x442928], eax
cmp eax, dword [0x44292c]
jb 0x410cf4
mov eax, dword [eax]
cmp eax, edi
je 0x410cd5
call eax
jmp 0x410cd5
push 0x43a098
mov eax, 0x43a090
call fcn.00410c04
pop ecx
push 0x43a0a4
mov eax, 0x43a09c
call fcn.00410c04
pop ecx
or dword [ebp - 4], 0xffffffff
call fcn.00410d35
cmp dword [ebp + 0x10], edi
jne 0x410d43
mov dword [0x441064], esi
push dword [ebp + 8]
call fcn.00410bc2
xor edi, edi
xor esi, esi
inc esi
call fcn.00412057
ret

Function at 0x410e42
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.00410f30
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x410edd
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 [0x441024]
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 0x410edd
cmp eax, 1
je 0x410efe
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 0x410edd
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x410eaa
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x410ed9
xor eax, eax
inc eax
jmp 0x410f1d
cmp edi, eax
jae 0x410ee1
xor eax, eax
jmp 0x410f1d
cmp eax, esi
jae 0x410ee8
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 [0x441024]
jmp 0x410f01
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 0x411372
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x431bf0
call fcn.0041201c
mov edi, 0x94
mov eax, edi
call fcn.00410f30
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 [0x441024], ecx
mov eax, dword [esi + 4]
mov dword [0x441030], eax
mov edx, dword [esi + 8]
mov dword [0x441034], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x441028], esi
cmp ecx, 2
je 0x4113d2
or esi, 0x8000
mov dword [0x441028], esi
shl eax, 8
add eax, edx
mov dword [0x44102c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x41140d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41140d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x411425
cmp eax, 0x20b
je 0x411412
mov dword [ebp - 0x1c], esi
jmp 0x411439
cmp dword [ecx + 0x84], 0xe
jbe 0x41140d
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x411433
cmp dword [ecx + 0x74], 0xe
jbe 0x41140d
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0041622f
pop ecx
test eax, eax
jne 0x41144d
push 0x1c
call fcn.0041134e
pop ecx
call fcn.00413fb9
test eax, eax
jne 0x41145e
push 0x10
call fcn.0041134e
pop ecx
call fcn.00416f98
mov dword [ebp - 4], esi
call fcn.004181fb
test eax, eax
jge 0x411477
push 0x1b
call fcn.00411329
pop ecx
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
mov dword [0x442920], eax
call fcn.004180d9
mov dword [0x441068], eax
call fcn.00418037
test eax, eax
jge 0x41149d
push 8
call fcn.00411329
pop ecx
call fcn.00417e04
test eax, eax
jge 0x4114ae
push 9
call fcn.00411329
pop ecx
push 1
call fcn.00410c1c
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4114c4
push eax
call fcn.00411329
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoA]
call fcn.00417da7
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4114e5
movzx eax, word [ebp - 0x40]
jmp 0x4114e8
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0041d2bc
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x411506
push edi
call fcn.00410d49
call fcn.00410d6b
jmp 0x411538
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00412057
ret
Function at 0x415fec
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 0x41601a
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 0x416021
cmp ebx, dword [eax + 4]
jae 0x416021
xor eax, eax
jmp 0x416211
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x416032
xor eax, eax
inc eax
jmp 0x416210
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x416048
cmp ecx, edx
jae 0x41618d
cmp dword [eax + 4], 0
je 0x416051
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x416039
cmp dword [ebp + 8], 0
je 0x416073
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x41618d
cmp eax, esi
jae 0x41618d
mov eax, dword [0x441188]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x416098
cmp dword [esi*4 + 0x441190], edi
je 0x416191
inc esi
cmp esi, eax
jl 0x416086
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x41620d
cmp dword [ebp - 8], 0x1000000
jne 0x41620d
test byte [ebp - 0xc], 0xcc
je 0x416116
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x41620d
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x41620d
cmp word [eax + 0x18], 0x10b
jne 0x41620d
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x41620d
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x416116
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x416116
test byte [ecx + 0x27], 0x80
jne 0x41618d
push 1
push 0x4411d0
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
test eax, eax
jne 0x41602a
mov ecx, dword [0x441188]
test ecx, ecx
mov edx, ecx
jle 0x41614a
lea eax, [ecx*4 + 0x44118c]
cmp dword [eax], edi
je 0x41614a
dec edx
sub eax, 4
test edx, edx
jg 0x41613e
test edx, edx
jne 0x41617b
push 0xf
pop ebx
cmp ecx, ebx
jg 0x416157
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x41616f
lea eax, [edx*4 + 0x441190]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x41615d
cmp ecx, 0x10
jge 0x41617b
inc ecx
mov dword [0x441188], ecx
push 0
push 0x4411d0
call dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
jmp 0x41602a
xor eax, eax
jmp 0x416210
test esi, esi
jle 0x41602a
mov ebx, dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
push 1
push 0x4411d0
call ebx
test eax, eax
jne 0x41602a
cmp dword [esi*4 + 0x441190], edi
je 0x4161e7
mov eax, dword [0x441188]
lea esi, [eax - 1]
test esi, esi
jl 0x4161d5
cmp dword [esi*4 + 0x441190], edi
je 0x4161d1
dec esi
jns 0x4161c5
test esi, esi
jge 0x4161e5
cmp eax, 0x10
jge 0x4161e0
inc eax
mov dword [0x441188], eax
lea esi, [eax - 1]
jmp 0x4161e7
je 0x4161ff
xor ecx, ecx
test esi, esi
jl 0x4161ff
lea eax, [ecx*4 + 0x441190]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4161ed
push 0
push 0x4411d0
call ebx
jmp 0x41602a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x417580
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 0x417756
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4415a0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x417756
test cl, 0x48
je 0x4175eb
cmp byte [eax + 5], 0xa
je 0x4175eb
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 0x41763d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x417625
call fcn.00413046
mov dword [eax], 9
call fcn.0041304f
mov dword [eax], esi
jmp 0x417635
cmp eax, 0x6d
je 0x417756
push eax
call fcn.00413058
pop ecx
or eax, 0xffffffff
jmp 0x417758
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x417751
test eax, eax
je 0x417664
cmp byte [ebx], 0xa
jne 0x417664
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x41766d
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 0x41774b
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x41773b
cmp al, 0xd
je 0x41769f
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x41772d
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x4176b9
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x4176b4
add dword [ebp + 0x10], 2
jmp 0x41770d
mov dword [ebp + 0x10], eax
jmp 0x417729
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 0x4176e1
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x417729
cmp dword [ebp - 0xc], 0
je 0x417729
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x417702
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x41770d
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x41772c
cmp ebx, dword [ebp + 0xc]
jne 0x417712
cmp byte [ebp - 1], 0xa
jne 0x417712
mov byte [ebx], 0xa
jmp 0x41772c
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041ab94
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41772d
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x417683
jmp 0x41774b
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x41774b
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 0x417758
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret