Function at 0x405ab0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, edx
mov dword [ebp - 0x24], eax
xor eax, eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
or dword [esi], 8
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], 0xfffffffe
call edi
mov ecx, eax
mov dword [ebp - 0x10], ecx
cmp ecx, 0xffffffff
jne 0x405b11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x405b6a
mov ecx, 0xe0010010
jmp 0x405f0f
cmp dword [ebp - 8], 0
jne 0x405f0a
test ecx, ecx
jne 0x405b27
or dword [esi], 0x10
jmp 0x405ca8
mov edx, 0x100
cmp ecx, edx
cmovae eax, edx
sub ecx, eax
cmp ecx, 0x7fffffff
ja 0x405b6a
push 0
push 0
push ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x405b80
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x405b80
push dword [ebp - 0xc]
xor edx, edx
mov ecx, 0xa0010017
call fcn.00411f50
add esp, 4
pop edi
pop esi
mov eax, 0xfffffffd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004194d8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x14]
push 0x20010010
push eax
push 0x1ffc
mov edx, ebx
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x405b6a
mov eax, dword [ebp - 0x14]
mov byte [ebx + eax], 0
test byte [esi], 0x10
jne 0x405bc0
push 0x437320
push ebx
call fcn.0041a3d0
add esp, 8
test eax, eax
jne 0x405bc0
or dword [esi], 0x10
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x405be2
mov ecx, dword [ebp - 0x10]
nop word [eax + eax]
dec eax
mov dword [ebp - 0x14], eax
cmp byte [ebx + eax], 0x20
ja 0x405bdf
dec ecx
test eax, eax
jne 0x405bd0
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
cmp eax, 0x7fffffff
ja 0x405b6a
push 0
push 0
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x405c11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405b58
test byte [esi], 0x10
mov eax, str._r_n_r_n
mov esi, 0x436634
cmove esi, eax
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405c26
sub ecx, edx
mov edx, esi
push 0x20010016
push 0
push ecx
mov ecx, dword [ebp - 0xc]
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x405b6a
lea ecx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x405c50
mov eax, dword [ebp - 0x10]
sub esi, ecx
add eax, esi
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
cmp eax, 0x7fffffff
ja 0x405c96
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x405c96
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x405c96
push esi
xor edx, edx
mov ecx, 0xa0010017
call fcn.00411f50
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x405b6a
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
cmp eax, 0xffffffff
je 0x405ef4
lea ecx, [ebp - 8]
mov dword [ebp - 8], 0
push ecx
push eax
call edi
cmp eax, 0xffffffff
jne 0x405cf9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x405d10
push dword [ebp - 0x24]
mov ecx, 0xe0010010
xor edx, edx
call fcn.00411f50
add esp, 4
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004194d8
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 8], 0
jne 0x405ecc
cmp eax, 0x10
jb 0x405ef4
nop dword [eax]
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x14]
push 0x20010010
push eax
push 0x1ffc
mov edx, ebx
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x405e79
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x405e5d
mov byte [ebx + eax], 0
test byte [esi], 0x10
je 0x405d88
push 0xd
push ebx
call fcn.0041a640
mov esi, eax
add esp, 8
test esi, esi
je 0x405d85
mov eax, esi
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405d60
sub eax, edx
push eax
lea eax, [esi + 1]
push eax
push esi
call fcn.0041c640
push 0xd
push esi
call fcn.0041a640
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x405d58
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi]
test al, 8
je 0x405daf
and eax, 0xfffffff7
push 0x5b
push ebx
mov dword [esi], eax
call fcn.0041a640
mov esi, eax
add esp, 8
test esi, esi
je 0x405ef4
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
jmp 0x405db1
mov esi, ebx
test al, 4
je 0x405e52
test byte [0x43ac6a], 0x20
je 0x405e52
push 0
push 0x6faf
push esi
call fcn.00416ec0
push 0
mov edi, eax
push 0xfde9
push edi
call fcn.00416da0
mov dword [ebp - 0x18], eax
test edi, edi
je 0x405df2
push edi
call fcn.0041d6c3
add esp, 4
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x405e55
mov esi, edi
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405e00
sub ecx, edx
push 0x20010016
push 0
mov edx, esi
mov esi, dword [ebp - 0xc]
push ecx
mov ecx, esi
call fcn.00412150
mov ecx, dword [ebp - 0x20]
add esp, 0xc
test eax, eax
mov eax, 0xfffffffd
cmove ecx, eax
mov dword [ebp - 0x20], ecx
test edi, edi
je 0x405e45
push edi
call fcn.0041d6c3
mov ecx, dword [ebp - 0x20]
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], eax
cmp ecx, 0xfffffffd
je 0x405e7c
mov esi, dword [ebp - 0x1c]
jmp 0x405d10
mov edi, dword [ebp - 0x18]
test esi, esi
jne 0x405dfb
xor ecx, ecx
jmp 0x405e09
test byte [esi], 8
jne 0x405ef4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004194d8
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
cmp eax, 0x7fffffff
ja 0x405eb1
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x405eb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x405eb1
push esi
xor edx, edx
mov ecx, 0xa0010017
call fcn.00411f50
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [ebp - 0x20]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004194d8
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x24]
mov ecx, 0xa001001f
xor edx, edx
call fcn.00411f50
add esp, 4
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004194d8
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004194d8
mov esp, ebp
pop ebp
ret
mov ecx, 0xa001001f
push dword [ebp - 0xc]
xor edx, edx
call fcn.00411f50
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
call fcn.004194d8
mov esp, ebp
pop ebp
ret