Function at 0x4aad50
Capabilities:
Get file size

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0xa8]
push ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.00419310
mov ecx, dword [esi + 0x48]
cmp ecx, dword [eax + 0xac]
jb 0x4ab045
mov eax, dword [esi]
xor ebp, ebp
cmp eax, ebp
je 0x4ab045
cmp eax, 4
je 0x4ab045
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esi + 0x1c], 8
jb 0x4aada5
mov eax, dword [esi + 8]
jmp 0x4aada8
lea eax, [esi + 8]
push ebp
push 0x10000000
push 3
push ebp
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4ab04c
lea edx, [esp + 0x28]
push edx
push edi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x13], 0
mov byte [esp + 0x12], 1
mov byte [esp + 0x11], 0
call fcn.00419310
mov eax, dword [eax + 0xac]
mov edi, dword [esi + 0x50]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x54]
cmp edi, eax
mov dword [esp + 0x14], ebp
jae 0x4aae1a
mov edi, eax
xor ebx, ebx
call fcn.00419310
cmp dword [eax + 0xb0], ebx
jle 0x4aaf50
lea ecx, [esi + 0x58]
mov dword [esp + 0x20], ecx
lea edx, [ebx + 1]
mov dword [esp + 0x24], edx
call fcn.00419310
mov eax, dword [eax + 0xac]
mov ecx, dword [esp + 0x24]
imul eax, ecx
cmp dword [esi + 0x48], eax
jb 0x4aae7d
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x28], 2
jne 0x4aae60
cmp dword [eax], ebp
jne 0x4aae92
add eax, 4
mov ebx, ecx
mov dword [esp + 0x20], eax
call fcn.00419310
cmp ebx, dword [eax + 0xb0]
jl 0x4aae34
mov ebx, ebp
jmp 0x4aaf50
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov byte [esp + 0x11], bl
mov byte [esp + 0x13], 1
call fcn.00419310
mov edx, dword [esi + 0x3c]
movzx ebp, bl
imul ebp, dword [eax + 0xac]
mov ebx, dword [esi + 0x40]
xor eax, eax
mov ecx, edi
add ecx, edx
adc eax, ebx
cmp eax, dword [esp + 0x2c]
ja 0x4aaf28
jb 0x4aaec6
cmp ecx, dword [esp + 0x28]
ja 0x4aaf28
cmp edi, ebp
jb 0x4aaf28
mov edx, dword [esp + 0x18]
lea eax, [edx + ebp]
cmp edi, eax
jb 0x4aaee3
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x18], 0
jmp 0x4aaef8
mov ebx, edi
sub ebx, ebp
call fcn.00419310
mov eax, dword [eax + 0xac]
sub eax, ebx
mov dword [esp + 0x18], eax
mov ecx, dword [esi + 0x40]
mov edx, dword [esi + 0x3c]
push edi
push 0
push 0xa00000
push ecx
push edx
mov ebp, edi
mov byte [esp + 0x26], 0
call fcn.004c15f0
push eax
mov eax, dword [esi + 0xda]
push 0x50f780
push eax
call fcn.00418e20
jmp 0x4aaf4d
push edi
push 0
push 0xa00000
push ebx
push edx
call fcn.004c15f0
mov ecx, dword [esi + 0xda]
push eax
push 0x50f7f0
push ecx
call fcn.00418e20
mov ebx, dword [esp + 0x24]
add esp, 0x10
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [esp + 0x13], 0
je 0x4ab04c
mov eax, dword [esp + 0x18]
xor edi, edi
test eax, eax
jbe 0x4aafdd
cmp byte [esp + 0x12], 0
je 0x4aaf9e
movzx edi, byte [esp + 0x11]
mov ecx, dword [esi + edi*4 + 0x58]
push 6
add ecx, ebx
push ecx
push eax
call fcn.00419310
mov edx, dword [eax + 0xac]
imul edx, edi
add edx, ebx
push 0
push edx
lea eax, [esi + 0x20]
jmp 0x4aafc1
movzx ecx, byte [esp + 0x11]
mov edx, dword [esi + ecx*4 + 0x58]
push 0x80
add edx, ebx
push edx
mov edx, dword [esi + 0x40]
push eax
mov eax, ebp
xor ecx, ecx
add eax, dword [esi + 0x3c]
adc edx, ecx
push edx
push eax
lea eax, [esi + 4]
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x54], esp
push eax
call fcn.00406510
mov ecx, esi
call fcn.004a98e0
mov edi, eax
test edi, edi
jl 0x4ab03b
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [esp + 0x12], 0
movzx ebx, byte [esp + 0x11]
je 0x4ab001
mov dword [esi + ebx*4 + 0x80], 3
jmp 0x4ab01b
mov dword [esi + ebx*4 + 0x80], 4
mov eax, dword [esi + 0x44]
add ebp, edi
cmp ebp, eax
mov dword [esi + 0x50], ebp
jbe 0x4ab01b
mov dword [esi + 0x50], eax
mov ecx, dword [esi + ebx*4 + 0x58]
push ecx
call fcn.004abf30
mov edx, dword [esp + 0x20]
add esp, 4
push edx
mov dword [esi + ebx*4 + 0x58], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret