Function at 0x408360
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1d4
mov eax, dword [0x463610]
xor eax, esp
mov dword [esp + 0x1cc], eax
mov eax, dword [esp + 0x1d8]
push ebx
push ebp
push esi
push edi
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
test ebx, ebx
jne 0x4083a5
xor al, al
jmp 0x40873c
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [esp + 0x14]
push eax
push 0x40
lea ecx, [esp + 0x1a4]
push ecx
push ebx
call ebp
mov edx, dword [esp + 0x1d4]
push 0
push 0
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x14]
push eax
push pe_nt_image_headers32
lea ecx, [esp + 0x84]
push ecx
push ebx
call ebp
cmp word [esp + 0x7e], 0
mov dword [esp + 0x14], 0
jbe 0x408438
push 0
lea edx, [esp + 0x14]
push edx
push 0x28
lea eax, [esp + 0x17c]
push eax
push ebx
call ebp
mov edi, str..rsrc
lea esi, [esp + 0x170]
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x408438
mov eax, dword [esp + 0x14]
movzx ecx, word [esp + 0x7e]
add eax, 1
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x4083f9
mov edx, dword [esp + 0x184]
xor esi, esi
push esi
push esi
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [esp + 0x184]
push esi
lea eax, [esp + 0x14]
push eax
push 0x10
lea ecx, [esp + 0x4c]
push ecx
push ebx
mov dword [esp + 0x2c], esi
call ebp
movzx edx, word [esp + 0x4c]
movzx eax, word [esp + 0x4e]
add edx, eax
test edx, edx
jle 0x408627
lea ebx, [ebx]
push 0
lea ecx, [esp + 0x14]
push ecx
push 8
lea edx, [esp + 0x44]
push edx
push ebx
call ebp
cmp dword [esp + 0x38], 3
jne 0x408610
mov eax, dword [esp + 0x3c]
push 0
and eax, 0x7fffffff
push 0
add eax, edi
push eax
push ebx
mov dword [esp + 0x28], 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x10
lea edx, [esp + 0x2c]
push edx
push ebx
call ebp
mov ax, word [esp + 0x2e]
cmp ax, 0x100
ja 0x40839e
test ax, ax
mov dword [esp + 0x1c], 0
jbe 0x408610
push 0
lea eax, [esp + 0x14]
push eax
push 8
lea ecx, [esp + 0x5c]
push ecx
push ebx
call ebp
mov eax, dword [esp + 0x54]
test eax, 0x80000000
jbe 0x4085f8
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
and eax, 0x7fffffff
push 0
add eax, edi
push eax
push ebx
call esi
push 0
lea edx, [esp + 0x14]
push edx
push 0x10
lea eax, [esp + 0x74]
push eax
push ebx
call ebp
push 0
lea ecx, [esp + 0x14]
push ecx
push 8
lea edx, [esp + 0x3c]
push edx
push ebx
call ebp
mov eax, dword [esp + 0x34]
push 0
push 0
add eax, edi
push eax
push ebx
call esi
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x10
lea edx, [esp + 0x64]
push edx
push ebx
call ebp
xor esi, esi
cmp word [esp + 0x2e], si
jbe 0x4085f8
mov dword [esp + 0x14], esi
mov edx, dword [esp + 0x5c]
cmp edx, 0x2c
jb 0x4085b8
mov eax, dword [esp + 0x58]
sub eax, dword [esp + 0x17c]
mov ecx, dword [esp + 0x1ec]
add eax, edi
cmp ecx, 1
jne 0x4085a5
mov dword [esi*4 + 0x469ec8], edx
mov dword [esi*4 + 0x4696c8], eax
jmp 0x4085b8
cmp ecx, 2
jne 0x4085b8
mov dword [esi*4 + 0x469ac8], edx
mov dword [esi*4 + 0x4692c8], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
push 0
add ecx, eax
push 0
lea edx, [ecx + edi + 0x10]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x14]
push eax
push 0x10
lea ecx, [esp + 0x64]
push ecx
push ebx
call ebp
movzx edx, word [esp + 0x2e]
add dword [esp + 0x14], 0x10
add esi, 1
cmp esi, edx
jl 0x408573
mov eax, dword [esp + 0x1c]
movzx ecx, word [esp + 0x2e]
add eax, 1
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x4084ec
movzx edx, word [esp + 0x4c]
movzx eax, word [esp + 0x4e]
add esi, 1
add edx, eax
cmp esi, edx
jl 0x408480
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], 0
je 0x40839e
mov eax, dword [esp + 0x1ec]
cmp eax, 1
jne 0x4086bf
movzx eax, word [esp + 0x2e]
cmp eax, 0x100
mov dword [0x4692c4], eax
jg 0x40839e
lea ebx, [eax - 1]
xor edi, edi
test ebx, ebx
jle 0x40873a
mov eax, ebx
cmp eax, edi
jle 0x4086b3
lea ecx, [ecx]
mov ecx, dword [eax*4 + 0x469ec4]
mov edx, dword [eax*4 + 0x469ec8]
cmp edx, ecx
jbe 0x4086ac
mov esi, dword [eax*4 + 0x4696c8]
mov dword [eax*4 + 0x469ec8], ecx
mov ecx, dword [eax*4 + 0x4696c4]
mov dword [eax*4 + 0x4696c8], ecx
mov dword [eax*4 + 0x469ec4], edx
mov dword [eax*4 + 0x4696c4], esi
sub eax, 1
cmp eax, edi
jg 0x408670
add edi, 1
cmp edi, ebx
jl 0x408667
jmp 0x40873a
cmp eax, 2
jne 0x40873a
movzx eax, word [esp + 0x2e]
cmp eax, 0x100
mov dword [0x4692c0], eax
jg 0x40839e
lea ebx, [eax - 1]
xor edi, edi
test ebx, ebx
jle 0x40873a
mov eax, ebx
cmp eax, edi
jle 0x408733
jmp 0x4086f0
mov ecx, dword [eax*4 + 0x469ac4]
mov edx, dword [eax*4 + 0x469ac8]
cmp edx, ecx
jbe 0x40872c
mov esi, dword [eax*4 + 0x4692c8]
mov dword [eax*4 + 0x469ac8], ecx
mov ecx, dword [eax*4 + 0x4692c4]
mov dword [eax*4 + 0x4692c8], ecx
mov dword [eax*4 + 0x469ac4], edx
mov dword [eax*4 + 0x4692c4], esi
sub eax, 1
cmp eax, edi
jg 0x4086f0
add edi, 1
cmp edi, ebx
jl 0x4086e2
mov al, 1
mov ecx, dword [esp + 0x1dc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0043197e
add esp, 0x1d4
ret