Function at 0x40521d
Capabilities:
Get file size

Disassembly:
push 0x24
mov eax, 0x427546
call fcn.004151ef
mov esi, ecx
xor ebx, ebx
lea edi, [esi + 0x15c]
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov eax, dword [edi + 4]
push edi
push eax
lea ecx, [ebp - 0x30]
call fcn.00402b38
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
jmp 0x40535d
lea ecx, [ebp - 0x28]
call fcn.00402af3
cmp dword [eax + 0x1c], 0xffffffff
jne 0x405341
push 0x429960
lea eax, [esi + 0x10]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00403369
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], ebx
call fcn.00402af3
add eax, 4
push eax
push dword [ebp - 0x10]
lea eax, [ebp - 0x18]
push eax
call fcn.00403321
mov eax, dword [eax]
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x10], eax
call fcn.00402af3
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x1c], eax
lea ecx, [ebp - 0x18]
call fcn.004010f1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.004010f1
lea ecx, [ebp - 0x28]
call fcn.00402af3
cmp dword [eax + 0x1c], 0xffffffff
je 0x405341
lea ecx, [ebp - 0x28]
call fcn.00402af3
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], eax
call fcn.00402af3
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x10], eax
call fcn.00402af3
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
add eax, 0x14
push eax
mov eax, dword [ebp - 0x10]
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x10], eax
lea ecx, [ebp - 0x28]
call fcn.00402af3
mov ecx, eax
call fcn.00402677
test al, al
je 0x405341
lea ecx, [ebp - 0x28]
call fcn.00402af3
mov ecx, eax
call fcn.004026a4
lea ecx, [ebp - 0x28]
call fcn.00402af3
mov ecx, dword [eax + 0x10]
add dword [esi + 0x18], ecx
mov eax, dword [eax + 0x14]
lea ecx, [ebp - 0x28]
adc dword [esi + 0x1c], eax
call fcn.00402b14
mov eax, dword [edi + 8]
push edi
push eax
lea ecx, [ebp - 0x30]
call fcn.00402b38
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x28]
call fcn.00402bf8
test al, al
je 0x405257
lea eax, [ebp - 0x30]
push eax
mov ecx, esi
call fcn.0040272e
mov ecx, dword [esi + 0x170]
sub ecx, dword [esi + 0x18]
mov eax, dword [esi + 0x174]
sbb eax, dword [esi + 0x1c]
cmp eax, dword [esi + 0x2c]
jb 0x4053c2
ja 0x4053a7
cmp ecx, dword [esi + 0x28]
jbe 0x4053c2
push 5
mov ecx, esi
call fcn.004027c9
push 3
mov ecx, esi
call fcn.004027a5
mov byte [esi + 8], 1
jmp 0x405549
mov eax, dword [edi + 4]
push edi
push eax
lea ecx, [ebp - 0x30]
call fcn.00402b38
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 8]
push edi
push eax
jmp 0x40552a
lea ecx, [ebp - 0x28]
call fcn.00402af3
mov ecx, eax
call fcn.00402677
test al, al
jne 0x40551e
lea ecx, [ebp - 0x28]
call fcn.00402af3
cmp dword [eax + 0x1c], 0xffffffff
jne 0x405492
push 0x429960
lea eax, [esi + 0x10]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00403369
mov dword [ebp - 0x20], eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 1
call fcn.00402af3
add eax, 4
push eax
push dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push eax
call fcn.00403321
mov eax, dword [eax]
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x20], eax
call fcn.00402af3
push ebx
push ebx
push 1
push ebx
push ebx
push 0xc0000000
push dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 0x1c], eax
lea ecx, [ebp - 0x14]
call fcn.004010f1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.004010f1
lea ecx, [ebp - 0x28]
call fcn.00402af3
cmp dword [eax + 0x1c], 0xffffffff
je 0x40551e
lea ecx, [ebp - 0x28]
call fcn.00402af3
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x20], eax
call fcn.00402af3
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x1c], eax
call fcn.00402af3
mov ecx, dword [ebp - 0x20]
push ebx
add ecx, 0xc
push ecx
mov ecx, dword [ebp - 0x1c]
push dword [ecx + 8]
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
lea ecx, [ebp - 0x28]
call fcn.00402af3
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
lea ecx, [ebp - 0x28]
call fcn.00402af3
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
lea ecx, [ebp - 0x28]
call fcn.00402af3
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x20], eax
call fcn.00402af3
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x1c], eax
call fcn.00402af3
mov ecx, dword [ebp - 0x20]
push ebx
add ecx, 0x14
push ecx
mov ecx, dword [ebp - 0x1c]
push dword [ecx + 0x10]
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
lea ecx, [ebp - 0x28]
call fcn.00402b14
push edi
push dword [edi + 8]
lea ecx, [ebp - 0x30]
call fcn.00402b38
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x28]
call fcn.00402bf8
test al, al
je 0x4053e5
mov byte [esi + 8], bl
call fcn.0041528e
ret