Function at 0x50f5c0
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x600188
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov edi, ecx
mov esi, edx
cmp byte [esi + 0x35], 0
mov dword [esp + 0x20], 0
je 0x50f5ff
push esi
call fcn.0050f8c0
lea ecx, [esi + 0x1c]
mov dword [esp + 0x30], ecx
call fcn.004cb9a0
lea ebp, [esi + 4]
mov ecx, ebp
call fcn.0045f230
push 0x6244e0
xor ebx, ebx
mov eax, esi
call fcn.004037a0
xor edx, edx
cmp edi, edx
mov byte [esi + 0x34], dl
mov byte [esi + 0x35], dl
jne 0x50f633
xor eax, eax
jmp 0x50f64f
mov eax, edi
lea ebx, [eax + 2]
jmp 0x50f640
mov cx, word [eax]
add eax, 2
cmp cx, dx
jne 0x50f640
sub eax, ebx
sar eax, 1
mov ebx, eax
push edi
mov eax, esi
call fcn.004037a0
xor ebx, ebx
xor esi, esi
mov dword [esp + 0x18], ebx
push esi
push 0x80
push 3
push esi
push 7
push SysReAllocStringLen
push edi
mov dword [esp + 0x70], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x50f78a
call fcn.0040f010
cmp eax, esi
jl 0x50f83f
mov eax, dword [esp + 0x5c]
cmp byte [eax], 0
jne 0x50f834
lea ecx, [esp + 0x28]
push ecx
push ebx
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
jne 0x50f6c9
call fcn.0040f010
test eax, eax
jl 0x50f6d3
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov esi, eax
mov dword [esp + 0x28], edx
push esi
call fcn.005d1ef5
mov edi, eax
add esp, 4
mov dword [esp + 0x20], edi
test edi, edi
mov byte [esp + 0x54], 1
je 0x50f863
mov eax, dword [esp + 0x5c]
cmp byte [eax], 0
jne 0x50f863
mov ecx, edi
lea edx, [esp + 0x18]
call fcn.00417460
test ebx, ebx
je 0x50f71e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], 0
mov ebx, dword [esp + 0x18]
mov edx, dword [0x677600]
mov eax, dword [edx + 0xc]
mov ecx, 0x677600
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov edx, esi
mov eax, edi
lea ecx, [esp + 0x34]
mov byte [esp + 0x54], 2
call fcn.0050e120
lea ecx, [esp + 0x1c]
push ecx
lea eax, [esp + 0x38]
call fcn.0050e200
test eax, eax
je 0x50f813
lea ecx, [ecx]
mov edx, dword [esp + 0x5c]
cmp byte [edx], 0
jne 0x50f813
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x1c]
push 0
push eax
push ecx
mov ecx, ebp
call fcn.0045f2d0
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x50f795
mov dword [ecx], eax
jmp 0x50f798
mov dword [esp + 0x18], eax
mov ebx, eax
jmp 0x50f692
mov dword [ebp], eax
lea ebx, [esp + 0x1c]
mov dword [ebp + 4], eax
mov dword [esp + 0x24], eax
call fcn.00415310
mov edi, eax
call fcn.00415390
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 0xc]
cmp eax, 2
jle 0x50f7f5
test eax, eax
jl 0x50f859
cmp word [ecx], 0x5b
jne 0x50f7f5
test eax, eax
jle 0x50f7f5
push 0x5d
push ecx
call fcn.005d33c4
add esp, 8
test eax, eax
je 0x50f7f5
sub eax, dword [esp + 0x1c]
sar eax, 1
cmp eax, 0xffffffff
je 0x50f7f5
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x24]
push edx
call fcn.005109b0
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x38]
call fcn.0050e200
test eax, eax
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
jne 0x50f760
mov edx, dword [esp + 0x5c]
xor ecx, ecx
cmp byte [edx], cl
sete cl
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x1c]
call fcn.00403870
push edi
call fcn.005d2367
add esp, 4
test ebx, ebx
je 0x50f83f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 4
push 0x80070057
call fcn.00403650
push edi
call fcn.005d2367
add esp, 4
test ebx, ebx
je 0x50f877
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x50f843