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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2f4
mov eax, dword [0x40b034]
xor eax, esp
mov dword [esp + 0x2f0], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, edx
push 0xffffffffffffffff
mov dword [esp + 0x58], ecx
push 0
mov ecx, edi
mov dword [esp + 0x34], edi
call fcn.00402425
mov ebx, edi
call fcn.004052f6
cmp dword [edi + 0x14], 8
jb 0x404cef
mov eax, dword [edi]
jmp 0x404cf1
mov eax, edi
xor esi, esi
push esi
push esi
push 3
push esi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x10], ebx
cmp ebx, 0xffffffff
je 0x404d28
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi + 0x20], eax
cmp eax, 0xffffffff
jne 0x404d34
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, edi
call fcn.004052f6
jmp 0x4052dd
mov dword [esp + 0x1c], esi
cmp eax, esi
jbe 0x404e0e
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi + 0x1c], eax
cmp eax, esi
jne 0x404d5f
push dword [esp + 0x10]
jmp 0x404d22
push esi
lea ecx, [esp + 0x20]
push ecx
push dword [edi + 0x20]
push eax
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x1c]
cmp eax, dword [edi + 0x20]
je 0x404d8b
push dword [edi + 0x1c]
push esi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x404d59
mov eax, dword [edi + 0x1c]
push 0x12
push str.CALLINFO
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.MSVCR100.dll_memcmp]
add esp, 0xc
test eax, eax
je 0x404dae
push dword [edi + 0x1c]
push esi
push ebx
jmp 0x404d83
push 8
lea edx, [edi + 0x24]
pop ecx
call fcn.00405917
mov ebx, dword [esp + 0x14]
add ebx, 0x220
mov dword [esp + 0x18], esi
mov dword [esp + 0xc], ebx
jmp 0x404dd1
mov ebx, dword [esp + 0xc]
cmp dword [ebx], esi
je 0x404e0e
lea eax, [ebx + 0xc]
push 0x7c
push eax
call dword [sym.imp.MSVCR100.dll_wcsrchr]
pop ecx
pop ecx
cmp eax, esi
je 0x404dec
xor ecx, ecx
mov word [eax], cx
mov eax, ebx
lea ebx, [edi + 0x24]
call fcn.004059fc
inc dword [esp + 0x18]
add dword [esp + 0xc], 0x294
xor esi, esi
cmp dword [esp + 0x18], 0x100
jb 0x404dcd
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [edi + 0x20], esi
je 0x4052dd
cmp dword [edi + 0x1c], esi
je 0x4052dd
mov dword [esp + 0x3c], esi
call fcn.00405d68
mov dword [esp + 0x38], eax
mov dword [eax], eax
mov eax, dword [esp + 0x38]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x38]
mov dword [eax + 8], eax
mov eax, dword [esp + 0x38]
mov byte [eax + 0x14], 1
mov eax, dword [esp + 0x38]
mov byte [eax + 0x15], 1
mov eax, 0x29620
mov ecx, eax
cmp dword [edi + 0x20], eax
ja 0x404ef3
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x48]
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
call fcn.0040547a
mov ebx, dword [esp + 0x44]
cmp ebx, dword [esp + 0x48]
je 0x4052c8
xor eax, eax
lea edi, [esp + 0x30]
mov dword [esp + 0x2c], esi
stosd dword es:[edi], eax
lea edi, [esp + 0x1c]
mov dword [esp + 0x14], 1
push section..data
mov ecx, edi
call fcn.00403687
add edi, 4
dec dword [esp + 0x14]
jns 0x404ea6
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
mov ecx, dword [esp + 0x48]
add eax, 0x10
sub ecx, ebx
sar ecx, 3
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x28], ecx
cmp ecx, esi
jbe 0x405192
jmp 0x405137
mov ecx, dword [esp + 0x14]
mov ebx, dword [edi + 0x1c]
add ebx, ecx
mov eax, dword [ebx + 0x10]
lea ecx, [ecx + eax*8 + 0x18]
mov dword [esp + 0x14], ecx
cmp eax, esi
je 0x40510c
mov esi, ebx
call fcn.0040554f
test eax, eax
jne 0x405106
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov esi, 0x4099e0
push esi
mov dword [esp + 0x14], eax
call dword [sym.imp.MSVCR100.dll_wcslen]
pop ecx
push eax
push esi
lea eax, [esp + 0x18]
call fcn.00405a84
mov eax, dword [ebx + 0x10]
push 0x40
pop ecx
mov dword [esp + 0x1c], ecx
cmp eax, ecx
ja 0x404f58
mov dword [esp + 0x1c], eax
xor ecx, ecx
cmp eax, 1
setne cl
mov dword [esp + 0x18], ecx
cmp ecx, eax
jae 0x40503b
lea eax, [ebx + ecx*8 + 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], eax
ja 0x40503b
mov eax, dword [esp + 0xc]
movzx esi, byte [eax]
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + 0x28]
sub eax, dword [ecx + 0x24]
mov edi, 0x294
cdq
idiv edi
cmp esi, eax
ja 0x40511e
imul esi, esi, 0x294
add esi, dword [ecx + 0x24]
lea eax, [esp + 0x6c]
push 0x5c
mov ecx, 0xa5
lea edi, [esp + 0x64]
push eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.MSVCR100.dll_wcsrchr]
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x404fd1
add esi, 2
jmp 0x404fd6
mov esi, 0x4099e4
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xc]
mov eax, dword [eax - 4]
sub eax, dword [esp + 0x60]
push eax
push esi
push dword [esp + 0x20]
lea eax, [esp + 0x34]
push str.__d._s._08x_
call fcn.00405e5b
mov esi, dword [esp + 0x38]
add esp, 0x10
push dword [esi - 0xc]
lea eax, [esp + 0x14]
push esi
call fcn.00405a84
lea eax, [esi - 0x10]
call fcn.00403930
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
add dword [esp + 0xc], 8
cmp eax, dword [ebx + 0x10]
jb 0x404f74
mov esi, 0x409a1c
push esi
call dword [sym.imp.MSVCR100.dll_wcslen]
pop ecx
push eax
push esi
lea eax, [esp + 0x18]
call fcn.00405a84
lea eax, [esp + 0x10]
call fcn.0040582d
mov edi, dword [esp + 0x38]
mov esi, dword [edi + 4]
jmp 0x40507f
lea eax, [esi + 0xc]
push eax
lea eax, [esp + 0x14]
call fcn.00405b71
test al, al
je 0x40507b
mov esi, dword [esi + 8]
jmp 0x40507f
mov edi, esi
mov esi, dword [esi]
cmp byte [esi + 0x15], 0
je 0x405065
mov dword [esp + 0x28], edi
cmp edi, dword [esp + 0x38]
je 0x4050a6
lea ecx, [esp + 0x10]
lea eax, [edi + 0xc]
push ecx
call fcn.00405b71
test al, al
jne 0x4050a6
lea eax, [esp + 0x28]
jmp 0x4050b2
mov eax, dword [esp + 0x38]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
mov eax, dword [eax]
mov ebx, dword [esp + 0x10]
cmp eax, dword [esp + 0x38]
jne 0x4050fb
lea eax, [ebx - 0x10]
call fcn.00405c22
lea edi, [eax + 0x10]
lea ecx, [esp + 0x58]
lea edx, [esp + 0x34]
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], 1
call fcn.004060ea
push eax
lea eax, [esp + 0x38]
push eax
lea esi, [esp + 0x4c]
call fcn.00405ed8
lea eax, [edi - 0x10]
call fcn.00403930
jmp 0x4050fe
inc dword [eax + 0x10]
lea eax, [ebx - 0x10]
call fcn.00403930
mov edi, dword [esp + 0x2c]
xor esi, esi
mov eax, dword [esp + 0x14]
cmp eax, dword [edi + 0x20]
jb 0x404eef
jmp 0x404e67
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
call fcn.00403930
jmp 0x4052d4
mov ebx, dword [esp + 0x44]
mov eax, dword [esp + 0xc]
cmp eax, 1
ja 0x405192
mov esi, eax
mov edi, eax
shl esi, 3
mov eax, dword [esi + ebx + 4]
add esi, ebx
mov ecx, dword [esi]
mov dword [esp + edi*4 + 0x2c], eax
mov eax, dword [ecx - 0xc]
add eax, eax
push eax
lea ebx, [esp + 0x28]
call fcn.00405356
lea edi, [esp + edi*4 + 0x1c]
call fcn.004057ec
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00403930
mov esi, dword [esi]
push dword [esi - 0xc]
lea eax, [esp + 0x18]
push esi
call fcn.00405a84
inc dword [esp + 0xc]
mov eax, dword [esp + 0xc]
xor esi, esi
cmp eax, dword [esp + 0x28]
jb 0x40512f
mov ebx, dword [esp + 0x1c]
lea eax, [ebx - 0x10]
call fcn.00405c22
lea edi, [eax + 0x10]
mov dword [esp + 0xc], edi
cmp dword [esp + 0x30], esi
je 0x405234
mov eax, dword [esp + 0x2c]
xor edx, edx
div dword [esp + 0x30]
cmp eax, 5
ja 0x405234
cmp dword [esp + 0x20], esi
jne 0x4051ce
push 0x80004005
call fcn.004027b1
push dword [esp + 0x20]
push ebx
call dword [sym.imp.MSVCR100.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jle 0x405206
lea eax, [esp + 0x1c]
lea edi, [esp + 0xc]
call fcn.004057ec
lea eax, [esp + 0x20]
lea edi, [esp + 0x1c]
call fcn.004057ec
lea eax, [esp + 0xc]
lea edi, [esp + 0x20]
call fcn.004057ec
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x24]
call fcn.0040586f
pop ecx
pop ecx
lea edi, [esp + 0xc]
call fcn.004057ec
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00403930
mov edi, dword [esp + 0xc]
mov eax, dword [edi - 0xc]
add eax, eax
push eax
mov ecx, edi
lea ebx, [esp + 0x28]
call fcn.00405356
mov esi, dword [eax]
push esi
call dword [sym.imp.MSVCR100.dll_wcslen]
pop ecx
mov ecx, esi
mov esi, dword [esp + 0x54]
call fcn.00402657
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00403930
lea eax, [edi - 0x10]
call fcn.00403930
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
call fcn.00403930
xor edi, edi
lea esi, [esp + 0x24]
inc edi
sub esi, 4
mov eax, dword [esi]
sub eax, 0x10
call fcn.00403930
dec edi
jns 0x405281
cmp dword [esp + 0x44], 0
je 0x4052ba
mov esi, dword [esp + 0x44]
mov eax, dword [esi]
sub eax, 0x10
call fcn.00403930
add esi, 8
cmp esi, dword [esp + 0x48]
jne 0x40529c
push dword [esp + 0x44]
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
pop ecx
lea esi, [esp + 0x34]
call fcn.00405a57
xor eax, eax
inc eax
jmp 0x4052df
cmp ebx, esi
je 0x4052d4
push ebx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
pop ecx
lea esi, [esp + 0x34]
call fcn.00405a57
xor eax, eax
mov ecx, dword [esp + 0x2fc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004080ae
mov esp, ebp
pop ebp
ret 4