Function at 0x4877f0
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x4ebdc3
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x670f1c]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x24], esi
mov eax, dword [esp + 0x68]
xor ebp, ebp
mov ebx, 8
cmp dword [esp + 0x7c], ebx
mov dword [esp + 0x4c], ebp
jae 0x487836
lea eax, [esp + 0x68]
push ebp
push 0x10000000
push 3
push ebp
push 7
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x48786e
cmp dword [esp + 0x7c], ebx
jb 0x487867
mov eax, dword [esp + 0x68]
push eax
call fcn.004aef39
add esp, 4
xor al, al
jmp 0x487bab
lea ecx, [esp + 0x28]
push ecx
push edi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ebx, eax
push edi
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, ebp
jne 0x4878ae
cmp dword [esp + 0x7c], 8
jb 0x487867
mov edx, dword [esp + 0x68]
push edx
call fcn.004aef39
add esp, 4
xor al, al
jmp 0x487bab
mov ebx, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
add esi, 0x1916a
push ebx
push edi
mov ecx, esi
mov dword [esp + 0x3c], esi
call fcn.0045d040
mov ebp, eax
xor eax, eax
cmp ebp, eax
jne 0x487988
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
push eax
push ecx
mov ecx, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x34]
push ecx
push edx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x64], esp
push 0xffffffffffffffff
mov ebp, 7
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x18], ebp
push eax
mov word [ecx + 4], ax
lea eax, [esp + 0x9c]
push eax
call fcn.00401640
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x7c], esp
xor eax, eax
push 0xffffffffffffffff
push eax
lea edx, [esp + 0xb8]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], eax
push edx
mov byte [esp + 0xa4], 1
mov word [ecx + 4], ax
call fcn.00401640
mov ecx, dword [esp + 0x70]
sub esp, 0x1c
mov ebp, esp
mov dword [esp + 0x88], esp
push ebx
push edi
mov byte [esp + 0xbc], 2
call fcn.00437d10
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0xac], esp
xor edx, edx
push 0xffffffffffffffff
push edx
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], edx
push eax
mov word [ecx + 4], dx
call fcn.00401640
jmp 0x487b6b
mov eax, dword [ebp + 0x1c]
cmp eax, dword [esp + 0x28]
mov ecx, dword [ebp + 0x20]
jne 0x48799e
cmp ecx, dword [esp + 0x2c]
je 0x487b8d
push ebx
push edi
mov ecx, esi
call fcn.0043fec0
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x20], eax
je 0x487ae7
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x17], cl
mov ecx, eax
xor esi, esi
call fcn.004402a0
test eax, eax
jbe 0x487a9c
mov ecx, dword [esp + 0x20]
push esi
call fcn.004402c0
mov edi, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
mov ebx, eax
lea eax, [esi + 1]
mov edx, 0xa00000
mov dword [esp + 0x30], eax
mul edx
cmp edx, edi
mov dword [esp + 0x3c], 0xa00000
mov dword [esp + 0x40], 0
jb 0x487a1f
ja 0x487a0e
mov edx, ecx
cmp eax, edx
jbe 0x487a1f
mov eax, esi
mov edx, 0xa00000
mul edx
sub ecx, eax
sbb edi, edx
mov esi, ecx
jmp 0x487a27
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x40]
xor eax, eax
cmp byte [esp + 0x17], al
je 0x487a38
mov word [ebx + 0x18], ax
mov dword [ebx + 0xc], eax
jmp 0x487a7f
mov ecx, dword [ebx + 0xc]
mov ebx, dword [esp + 0x2c]
mov edx, ecx
add edx, dword [esp + 0x18]
adc eax, dword [esp + 0x1c]
cmp eax, ebx
jb 0x487a66
mov eax, dword [esp + 0x28]
ja 0x487a57
cmp edx, eax
jbe 0x487a66
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x17], 1
jmp 0x487a7f
xor eax, eax
cmp eax, edi
ja 0x487a77
jb 0x487a72
cmp ecx, esi
jae 0x487a77
mov byte [esp + 0x17], 1
add dword [esp + 0x18], ecx
adc dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
call fcn.004402a0
cmp esi, eax
jb 0x4879d2
mov ebx, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push ebx
mov dword [ebp + 0x20], ecx
mov ecx, dword [esp + 0x28]
push edi
mov dword [ebp + 0x1c], eax
call fcn.00437d10
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x54], esp
xor edx, edx
push 0xffffffffffffffff
push edx
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], edx
push eax
mov word [ecx + 4], dx
call fcn.00401640
mov ecx, dword [esp + 0x58]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
jmp 0x487b8d
push ebx
push edi
mov ecx, esi
call fcn.0046f880
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x2c]
push 0
push ecx
mov ecx, dword [esp + 0x30]
push edx
push eax
push ecx
sub esp, 0x1c
lea edx, [esp + 0x94]
mov ecx, esp
mov dword [esp + 0x64], esp
push edx
call fcn.00406510
sub esp, 0x1c
lea eax, [esp + 0xb0]
mov ecx, esp
mov dword [esp + 0x7c], esp
push eax
mov byte [esp + 0x9c], 3
call fcn.00406510
mov ecx, dword [esp + 0x70]
sub esp, 0x1c
mov ebp, esp
mov dword [esp + 0x88], esp
push ebx
push edi
mov byte [esp + 0xbc], 4
call fcn.00437d10
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0xac], esp
push eax
call fcn.00406510
push ebp
mov ecx, esi
call fcn.0045fdf0
mov ecx, dword [esp + 0x8c]
push ebx
push edi
mov byte [esp + 0xbc], 0
call fcn.00487050
mov dword [esp + 0x38], eax
cmp dword [esp + 0x38], 0
setne bl
cmp dword [esp + 0x7c], 8
jb 0x487ba9
mov ecx, dword [esp + 0x68]
push ecx
call fcn.004aef39
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 0x2c