Function at 0x47a3d4
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
sub esp, 0x54
mov eax, 0x6ac668
call fcn.00664608
sub esp, 0x138
push ebx
push esi
mov esi, dword [ebp + 0x60]
mov eax, esi
push edi
cmp dword [esi + 0x14], 8
jb 0x47a3f8
mov eax, dword [esi]
push 0x80
push 4
push eax
call fcn.00452e49
mov ebx, eax
mov eax, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [ebp + 0x28], ebx
mov dword [ebp + 0x48], eax
mov dword [ebp + 0x2c], eax
xor edi, edi
mov dword [ebp - 4], edi
cmp ebx, 0xffffffff
jne 0x47a432
cmp dword [esi + 0x14], 8
jb 0x47a427
mov esi, dword [esi]
push esi
push str.Cant_open_archive_file__s
jmp 0x47a5c0
push edi
lea eax, [ebp + 0x60]
push eax
push 0x40
lea eax, [ebp - 0x4c]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x47a5b2
cmp dword [ebp + 0x60], 0x40
jne 0x47a5b2
mov eax, 0x5a4d
cmp word [ebp - 0x4c], ax
jne 0x47a5b2
push edi
push edi
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
jne 0x47a498
cmp dword [esi + 0x14], 8
jb 0x47a47e
mov esi, dword [esi]
push dword [ebp - 0x10]
push esi
push str.Cant_set_pointer_in_btinstall_file__s_to__d
lea eax, [ebp + 0x30]
push eax
call fcn.004577f2
add esp, 0x10
jmp 0x47a5cc
push edi
lea eax, [ebp + 0x60]
push eax
push 0xf8
lea eax, [ebp - 0x144]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x47a5b2
cmp dword [ebp + 0x60], 0xf8
jne 0x47a5b2
cmp dword [ebp - 0x144], 0x4550
jne 0x47a5b2
push edi
lea eax, [ebp + 0x60]
push eax
push 0x28
lea eax, [ebp]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x47a5a2
cmp dword [ebp + 0x60], 0x28
jne 0x47a5a2
xor eax, eax
mov dword [ebp + 0x4c], edi
mov ecx, edi
mov dword [ebp + 0x54], edi
mov dword [ebp + 0x50], ecx
cmp ax, word [ebp - 0x13e]
jae 0x47a553
cmp dword [ebp + 0x14], ecx
jbe 0x47a522
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
add eax, ecx
mov dword [ebp + 0x50], ecx
mov dword [ebp + 0x4c], eax
push edi
lea eax, [ebp + 0x60]
push eax
push 0x28
lea eax, [ebp]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x47a58b
cmp dword [ebp + 0x60], 0x28
jne 0x47a58b
mov ecx, dword [ebp + 0x54]
movzx eax, word [ebp - 0x13e]
inc ecx
mov dword [ebp + 0x54], ecx
cmp ecx, eax
mov ecx, dword [ebp + 0x50]
jl 0x47a50f
mov eax, dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp eax, edi
je 0x47a56b
test ebx, ebx
je 0x47a56b
push ebx
call eax
mov eax, edi
mov dword [ebp + 0x48], eax
mov dword [ebp + 0x2c], eax
push edi
push dword [ebp + 0x4c]
sub esp, 0x18
mov ecx, esp
push esi
mov dword [ecx], edi
mov dword [ecx + 0x10], edi
mov dword [ecx + 0x14], edi
call fcn.00427a37
call fcn.004796a9
mov edi, eax
jmp 0x47a5dd
cmp dword [esi + 0x14], 8
jb 0x47a593
mov esi, dword [esi]
mov eax, dword [ebp + 0x54]
push esi
push eax
push str.Cant_read_section__d_of__s
jmp 0x47a487
cmp dword [esi + 0x14], 8
jb 0x47a5aa
mov esi, dword [esi]
push esi
push str.Cant_read_sectiontable_of__s
jmp 0x47a5c0
cmp dword [esi + 0x14], 8
jb 0x47a5ba
mov esi, dword [esi]
push esi
push str.Cant_read_header_of__s
lea eax, [ebp + 0x30]
push eax
call fcn.004577f2
add esp, 0xc
mov ecx, dword [ebp + 0x64]
push eax
call fcn.00427924
lea ecx, [ebp + 0x30]
call fcn.00427afc
mov eax, dword [ebp + 0x48]
mov dword [ebp - 4], 7
test eax, eax
je 0x47a5f2
test ebx, ebx
je 0x47a5f2
push ebx
call eax
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add ebp, 0x58
leave
ret 8