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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d3001
mov eax, dword fs:[0]
push eax
sub esp, 0x414
mov eax, dword [0x500324]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x41c], ecx
mov dword [ebp - 0x3d0], 0
mov dword [ebp - 0x3d4], 0
call fcn.004079c0
push eax
lea ecx, [ebp - 0x94]
call fcn.004156d0
mov dword [ebp - 4], 0
call fcn.004079d0
mov ecx, eax
call fcn.00416760
movzx eax, al
test eax, eax
je 0x405b1d
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x94]
call fcn.00415c20
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0x94]
call fcn.00415ae0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3dc], eax
cmp dword [ebp - 0x3dc], 0xffffffff
jne 0x405a3d
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004158b0
jmp 0x405dc4
push 0
mov edx, dword [ebp - 0x3dc]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x3d4], eax
cmp dword [ebp - 0x3d4], 0
jne 0x405a72
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004158b0
jmp 0x405dc4
mov dword [ebp - 0x3e8], 0
mov eax, dword [ebp - 0x3d4]
push eax
call fcn.004a2305
add esp, 4
mov dword [ebp - 0x3f8], eax
mov ecx, dword [ebp - 0x3f8]
mov dword [ebp - 0x3d0], ecx
push 0
lea edx, [ebp - 0x3e8]
push edx
mov eax, dword [ebp - 0x3d4]
push eax
mov ecx, dword [ebp - 0x3d0]
push ecx
mov edx, dword [ebp - 0x3dc]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x3dc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x3e8]
cmp ecx, dword [ebp - 0x3d4]
je 0x405b18
mov edx, dword [ebp - 0x3d0]
mov dword [ebp - 0x3fc], edx
mov eax, dword [ebp - 0x3fc]
push eax
call fcn.004a230e
add esp, 4
mov dword [ebp - 0x3d0], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004158b0
jmp 0x405dc4
jmp 0x405daa
call fcn.004079d0
push eax
lea ecx, [ebp - 0x94]
call fcn.00415bf0
mov dword [ebp - 0x3d8], 0
call fcn.00407e00
movzx ecx, al
test ecx, ecx
je 0x405b54
call fcn.004079e0
mov dword [ebp - 0x3d8], eax
jmp 0x405bd9
call fcn.004079f0
push eax
lea ecx, [ebp - 0x19c]
call fcn.004156d0
mov byte [ebp - 4], 1
push 0
lea ecx, [ebp - 0x19c]
call fcn.00415ae0
push eax
call fcn.00410ec0
add esp, 8
mov dword [ebp - 0x3e4], eax
mov edx, dword [ebp - 0x3e4]
push edx
lea ecx, [ebp - 0x94]
call fcn.00415ae0
push eax
call fcn.00418590
add esp, 8
mov dword [ebp - 0x3d8], eax
cmp dword [ebp - 0x3e4], 0
je 0x405bca
mov eax, dword [ebp - 0x3e4]
mov dword [ebp - 0x400], eax
mov ecx, dword [ebp - 0x400]
push ecx
call fcn.004a230e
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x19c]
call fcn.004158b0
cmp dword [ebp - 0x3d8], 0
jne 0x405bf9
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004158b0
jmp 0x405dc4
mov dword [ebp - 0x3ec], 0
push 0xffffffffffffffff
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x118]
call fcn.00415710
mov byte [ebp - 4], 2
push 0x4d9a28
push 0x4d9a2c
lea ecx, [ebp - 0x118]
call fcn.00416b50
lea eax, [ebp - 0x3cc]
push eax
lea ecx, [ebp - 0x3ec]
push ecx
push 1
lea ecx, [ebp - 0x118]
call fcn.00415ae0
push eax
mov edx, dword [ebp - 0x3d8]
push edx
call fcn.00417880
add esp, 0x14
test eax, eax
je 0x405c82
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x118]
call fcn.004158b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004158b0
jmp 0x405dc4
mov eax, dword [ebp - 0x1a0]
mov dword [ebp - 0x3d4], eax
cmp dword [ebp - 0x3d4], 0
jne 0x405cbd
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x118]
call fcn.004158b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004158b0
jmp 0x405dc4
mov ecx, dword [ebp - 0x3d4]
push ecx
call fcn.004a2305
add esp, 4
mov dword [ebp - 0x404], eax
mov edx, dword [ebp - 0x404]
mov dword [ebp - 0x3d0], edx
mov eax, dword [ebp - 0x3d4]
push eax
mov ecx, dword [ebp - 0x3d0]
push ecx
mov edx, dword [ebp - 0x3ec]
push edx
mov eax, dword [ebp - 0x3d8]
push eax
call fcn.00418e20
add esp, 0x10
mov dword [ebp - 0x3f0], eax
cmp dword [ebp - 0x3f0], 0
je 0x405d80
cmp dword [ebp - 0x3f0], 0x600
je 0x405d80
mov ecx, dword [ebp - 0x3d0]
mov dword [ebp - 0x408], ecx
mov edx, dword [ebp - 0x408]
push edx
call fcn.004a230e
add esp, 4
mov dword [ebp - 0x3d0], 0
call fcn.00407e00
movzx eax, al
test eax, eax
jne 0x405d5d
mov ecx, dword [ebp - 0x3d8]
push ecx
call fcn.004174a0
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x118]
call fcn.004158b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004158b0
jmp 0x405dc4
call fcn.00407e00
movzx edx, al
test edx, edx
jne 0x405d9b
mov eax, dword [ebp - 0x3d8]
push eax
call fcn.004174a0
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x118]
call fcn.004158b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004158b0
xor ecx, ecx
jne 0x4059b5
cmp dword [ebp - 0x3d0], 0
jne 0x405eba
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3e0], eax
cmp dword [ebp - 0x3e0], 0xffffffff
jne 0x405e01
jmp 0x405eba
push 0
mov eax, dword [ebp - 0x3e0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x3d4], eax
cmp dword [ebp - 0x3d4], 0
jne 0x405e24
jmp 0x405eba
mov dword [ebp - 0x3f4], 0
mov ecx, dword [ebp - 0x3d4]
push ecx
call fcn.004a2305
add esp, 4
mov dword [ebp - 0x40c], eax
mov edx, dword [ebp - 0x40c]
mov dword [ebp - 0x3d0], edx
push 0
lea eax, [ebp - 0x3f4]
push eax
mov ecx, dword [ebp - 0x3d4]
push ecx
mov edx, dword [ebp - 0x3d0]
push edx
mov eax, dword [ebp - 0x3e0]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x3e0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x3f4]
cmp edx, dword [ebp - 0x3d4]
je 0x405eb3
mov eax, dword [ebp - 0x3d0]
mov dword [ebp - 0x410], eax
mov ecx, dword [ebp - 0x410]
push ecx
call fcn.004a230e
add esp, 4
mov dword [ebp - 0x3d0], 0
jmp 0x405eba
lea edx, [ebp - 0x420]
push edx
push 0
mov eax, dword [ebp - 0x3d4]
push eax
mov ecx, dword [ebp - 0x3d0]
push ecx
call dword [sym.imp.GDI32.dll_AddFontMemResourceEx]
mov dword [ebp - 0x418], eax
mov edx, dword [ebp - 0x3d0]
mov dword [ebp - 0x414], edx
mov eax, dword [ebp - 0x414]
push eax
call fcn.004a230e
add esp, 4
mov dword [ebp - 0x3d0], 0
mov ecx, dword [ebp - 0x418]
push ecx
mov ecx, dword [ebp - 0x41c]
add ecx, 0x514
call fcn.00415c80
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a18ad
mov esp, ebp
pop ebp
ret 4