Function at 0x47e590
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50daf8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x572bb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi], 0xffffffff
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 2
jne 0x47e7da
cmp dword [edi + 4], 0xffffffff
jne 0x47e7da
call fcn.00460220
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x47e5fc
push 0x80004005
call fcn.004712d0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
test ebx, 0x40000000
je 0x47e620
test ebx, ebx
js 0x47e620
or ebx, 0x80000000
cmp byte [ebp + 0x20], 0
je 0x47e62c
or ebx, 0xc0000000
mov eax, ebx
and eax, 0x80000000
je 0x47e654
test ebx, 0x40000000
je 0x47e654
mov dword [edi + 0x14], 0xf001f
mov dword [edi + 0x18], 4
mov dword [edi + 0x1c], 0
jmp 0x47e675
test eax, eax
je 0x47e675
test ebx, 0x40000000
jne 0x47e675
mov dword [edi + 0x14], 4
mov dword [edi + 0x18], 2
mov dword [edi + 0x1c], 1
test esi, esi
jne 0x47e67d
xor ecx, ecx
jmp 0x47e691
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x47e682
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x10]
call fcn.004725a0
mov esi, dword [ebp - 0x10]
push 0
push 0x80
push dword [ebp - 0x18]
push 0
push dword [edi + 0x1c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x47e751
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp byte [ebp + 0x24], cl
jne 0x47e703
cmp eax, 5
jne 0x47e708
mov dword [ebp - 0x14], 1
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47e7da
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x47e7da
cmp eax, 5
je 0x47e70d
cmp eax, 0x20
jne 0x47e74c
mov eax, ecx
inc ecx
mov dword [ebp - 0x10], ecx
cmp eax, 0xa
jge 0x47e74c
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push dword [ebp - 0x18]
push 0
push dword [edi + 0x1c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x47e74c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x10]
jmp 0x47e703
cmp dword [edi], 0xffffffff
je 0x47e6d2
push 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [edi + 0xc], ebx
cmp ebx, 0xffffffff
je 0x47e6d9
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x47e7b2
cmp dword [edi + 4], 0xffffffff
jne 0x47e7b2
cmp dword [edi + 8], 0
jne 0x47e7b2
test ebx, ebx
je 0x47e7b2
push 0
push ebx
push 0
push dword [edi + 0x18]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x47e7b2
push ebx
push 0
push 0
push dword [edi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 8], eax
test eax, eax
je 0x47e7b2
mov dword [edi + 0x10], ebx
add esi, 0xfffffff0
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47e7da
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20