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

Disassembly:
push 0xffffffffffffffff
push 0x414360
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x38]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push eax
mov dword [esp + 0x48], esi
call ebp
cmp eax, 0xffffffff
jne 0x40752f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x407492
and eax, 0xffff
or eax, 0x80070000
cmp eax, esi
jne 0x407770
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x4074d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x4074c7
and eax, 0xffff
or eax, 0x80070000
cmp eax, esi
jl 0x407770
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], esi
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
mov ecx, edi
and ecx, ebx
mov byte [esp + 0x2c], 1
cmp ecx, 0xffffffff
jne 0x407581
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call ebp
cmp eax, 0xffffffff
jne 0x407538
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x407540
and eax, 0xffff
or eax, 0x80070000
jmp 0x40753e
mov dword [esp + 0x10], eax
jmp 0x407498
mov dword [esp + 0x38], eax
jmp 0x407546
test eax, eax
jne 0x4075e3
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x40]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x3c], eax
jne 0x40757b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x407575
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x4075cc
mov eax, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
mov edi, eax
cmp dword [esp + 0x14], edi
jne 0x40775f
cmp dword [esp + 0x18], ebx
jne 0x40775f
cmp dword [esp + 0x38], 0xffffffff
jne 0x407601
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call ebp
cmp eax, 0xffffffff
jne 0x4075fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x407636
and eax, 0xffff
or eax, 0x80070000
jmp 0x407634
lea ecx, [esp + 0x38]
call fcn.004077a0
lea ecx, [esp + 0x10]
call fcn.004077a0
jmp 0x407781
lea ecx, [esp + 0x38]
call fcn.004077a0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407781
jmp 0x407778
mov dword [esp + 0x38], eax
push 0x10000
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
xor edi, edi
add esp, 4
cmp ebp, edi
jne 0x40765a
cmp dword [esp + 0x38], edi
je 0x407625
lea ecx, [esp + 0x38]
call fcn.004077a0
cmp dword [esp + 0x10], edi
je 0x407781
jmp 0x407778
test eax, eax
je 0x407601
mov eax, dword [esp + 0x38]
test eax, eax
je 0x407649
lea ecx, [esp + 0x38]
call fcn.004077a0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407781
jmp 0x407778
mov dword [esp + 0x34], 1
cmp dword [esp + 0x18], edi
ja 0x407674
mov ebx, dword [esp + 0x14]
cmp ebx, 0x8000
jb 0x407679
mov ebx, 0x8000
mov edx, dword [esp + 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x3c]
push edi
push ecx
push ebx
push ebp
push edx
mov dword [esp + 0x50], edi
call esi
test eax, eax
jne 0x4076e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x4076ac
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
jne 0x407729
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], edi
push edi
push eax
lea edi, [ebp + 0x8000]
push ebx
push edi
push ecx
call esi
test eax, eax
jne 0x4076e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4076f3
and eax, 0xffff
or eax, 0x80070000
jmp 0x4076f1
cmp dword [esp + 0x3c], ebx
jne 0x407729
jmp 0x4076ae
cmp dword [esp + 0x3c], ebx
jne 0x407727
jmp 0x4076f5
test eax, eax
jne 0x407727
mov ecx, ebx
mov esi, ebp
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x407703
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
sub edx, ebx
sbb ecx, 0
cmp ebx, 0x8000
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
jbe 0x40772d
xor edi, edi
jmp 0x407662
xor edi, edi
mov dword [esp + 0x34], edi
push ebp
call fcn.00413190
add esp, 4
lea ecx, [esp + 0x38]
call fcn.004077a0
lea ecx, [esp + 0x10]
call fcn.004077a0
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
mov eax, dword [esp + 0x38]
test eax, eax
je 0x407770
lea ecx, [esp + 0x38]
call fcn.004077a0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407781
lea ecx, [esp + 0x10]
call fcn.004077a0
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret