Function at 0x405160
Capabilities:
Get file size
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2e8
mov eax, dword [0x412384]
xor eax, esp
mov dword [esp + 0x2e0], eax
mov eax, dword [esp + 0x2ec]
push ebp
push esi
push edi
mov esi, ecx
xor edi, edi
push 0x2c
lea ecx, [esp + 0x58]
push edi
push ecx
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], 0x800b0100
mov dword [esp + 0x5c], edi
call sub.MSVCR80.dll_memset
add esp, 0xc
push edi
push edi
push 3
xor eax, eax
push edi
push 1
push 0x80000000
push esi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x9c], 0xf750e6c3
mov word [esp + 0xa0], 0x38ee
mov word [esp + 0xa2], 0x11d1
mov byte [esp + 0xa4], 0x85
mov byte [esp + 0xa5], 0xe5
mov byte [esp + 0xa6], al
mov byte [esp + 0xa7], 0xc0
mov byte [esp + 0xa8], 0x4f
mov byte [esp + 0xa9], 0xc2
mov byte [esp + 0xaa], 0x95
mov byte [esp + 0xab], 0xee
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405516
cmp esi, edi
je 0x405516
lea edx, [esp + 0x18]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40550f
cmp dword [esp + 0x1c], edi
jg 0x40550f
jl 0x40528e
cmp dword [esp + 0x18], 0x2000000
ja 0x40550f
push 0x100
mov dword [esp + 0x10], 0x100
call fcn.0040a972
mov ecx, dword [ebx + 0x10c4]
add esp, 4
push edi
mov ebp, eax
push ebp
lea eax, [esp + 0x14]
push eax
push esi
call ecx
test eax, eax
jne 0x4052f7
push ebp
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov edx, dword [esp + 0x10]
push edx
call fcn.0040a972
mov ecx, dword [ebx + 0x10c4]
add esp, 8
push edi
mov ebp, eax
push ebp
lea eax, [esp + 0x14]
push eax
push esi
call ecx
test eax, eax
jne 0x4052f7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
jmp 0x405516
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x10c8]
push edi
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x18]
push eax
call ecx
test eax, eax
je 0x4052e9
mov eax, dword [esp + 0xc]
mov ecx, 0x11
mov esi, str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_________._:_________
lea edi, [esp + 0x2a0]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
lea eax, [eax + eax + 1]
mov edx, 2
mul edx
seto cl
movsw word es:[edi], word [esi]
neg ecx
or ecx, eax
push ecx
call fcn.0040a972
mov ecx, dword [esp + 0x10]
mov esi, eax
add esp, 4
xor eax, eax
test ecx, ecx
jbe 0x405392
lea ebx, [ebx]
movzx ecx, byte [eax + ebp]
shr ecx, 4
movsx edx, byte [esp + ecx + 0x2a0]
mov word [esi + eax*4], dx
movzx ecx, byte [eax + ebp]
and ecx, 0xf
movsx edx, byte [esp + ecx + 0x2a0]
mov word [esi + eax*4 + 2], dx
mov ecx, dword [esp + 0xc]
add eax, 1
cmp eax, ecx
jb 0x405360
push 0
mov word [esi + ecx*4], 0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [ebx + 0x10cc]
push 0
push eax
push ebp
push ecx
call edx
push ebp
mov edi, eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
test edi, edi
je 0x4054ea
push 0x208
lea eax, [esp + 0x98]
push 0
push eax
mov dword [esp + 0x9c], 0
call sub.MSVCR80.dll_memset
mov edx, dword [ebx + 0x10d0]
add esp, 0xc
push 0
lea ecx, [esp + 0x94]
push ecx
push edi
call edx
test eax, eax
je 0x4054d4
cmp byte [ebx + 0x1032], 0
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x94]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], ecx
mov eax, 2
mov ecx, 1
lea edx, [esp + 0x2c]
mov dword [esp + 0x2c], 0x24
mov dword [esp + 0x38], esi
mov dword [esp + 0x50], 0x30
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x68], edx
je 0x40545b
or dword [esp + 0x78], 0x1200
jmp 0x405460
or dword [esp + 0x78], 0x10
mov edx, dword [ebx + 0x10e4]
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x84]
push ecx
push 0xffffffffffffffff
call edx
mov ebp, eax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4054a3
cmp ebp, 0x800b0100
mov word [eax], 0
je 0x4054a3
mov ecx, dword [esp + 0x2fc]
mov edx, dword [esp + 0x70]
push ecx
push eax
push edx
mov ecx, ebx
call fcn.00404e90
mov edx, dword [ebx + 0x10e4]
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x84]
push ecx
push 0xffffffffffffffff
mov dword [esp + 0x78], 2
call edx
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0x10d4]
push 0
push edi
push eax
call ecx
jmp 0x4054ee
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0x10d4]
mov ebp, dword [esp + 0x14]
push 0
push edi
push eax
call ecx
jmp 0x4054ee
mov ebp, dword [esp + 0x14]
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov edx, dword [esp + 0x14]
mov eax, dword [ebx + 0x10d8]
add esp, 4
push 0
push edx
call eax
mov eax, ebp
call fcn.004047b0
jmp 0x40551b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [esp + 0x2ec]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0040bac6
add esp, 0x2e8
ret 8