Function at 0x5114f0
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x5fc2a0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
xor ebp, ebp
xor esi, esi
mov dword [esp + 0x18], ebp
lea eax, [esp + 0x20]
push 0x67f5e4
push eax
mov ebx, str.cdictlist
mov dword [esp + 0x4c], esi
call fcn.0040aab0
mov eax, dword [eax]
add esp, 8
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x511561
call fcn.0040f010
mov edi, eax
jmp 0x511569
mov dword [esp + 0x18], eax
xor edi, edi
mov ebp, eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x511589
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, esi
jge 0x511594
cmp ebp, esi
jmp 0x511845
lea ecx, [esp + 0x30]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x2c], eax
jne 0x5115b6
call fcn.0040f010
cmp eax, esi
jl 0x5115c6
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, eax
or edx, ecx
mov ebx, eax
mov dword [esp + 0x30], ecx
jne 0x5115cd
cmp ebp, esi
jmp 0x511845
cmp ecx, esi
ja 0x5115d8
cmp eax, 0x10000
jb 0x5115e1
mov ebx, 0x10000
mov dword [esp + 0x30], esi
push ebx
call fcn.005d1ef5
mov edi, eax
add esp, 4
mov dword [esp + 0x24], edi
cmp edi, esi
mov byte [esp + 0x44], 1
jne 0x511609
push esi
call fcn.005d2367
add esp, 4
cmp ebp, esi
jmp 0x511845
mov esi, ebx
mov ecx, edi
lea edx, [esp + 0x18]
call fcn.00417460
test ebp, ebp
je 0x51162d
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], 0
mov ebp, dword [esp + 0x18]
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
add ebx, edi
mov ecx, 0x677600
mov esi, edi
mov dword [esp + 0x2c], ebx
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x44], 2
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x20], eax
cmp edi, ebx
mov byte [esp + 0x44], 3
jae 0x5117e9
cmp word [esi], 0x13d6
jne 0x5117e5
movzx eax, word [esi + 2]
add eax, esi
cmp eax, ebx
mov dword [esp + 0x28], eax
ja 0x5117e5
movzx edx, word [esi + 0x28]
movzx ecx, word [esi + 0x2a]
movzx ebp, word [esi + 0x26]
add ecx, edx
movzx edx, word [esi + 0x24]
add edx, esi
add edx, ecx
add ebp, edx
cmp ebp, eax
ja 0x5117e1
test byte [esi + 0x20], 1
je 0x5117bd
mov ebp, dword [esp + 0x4c]
mov ebx, dword [ebp + 4]
lea edi, [ebx + 1]
mov eax, ebp
call fcn.00516970
test al, al
je 0x5117cd
cmp ebx, dword [ebp + 4]
jae 0x5117d7
mov ecx, dword [ebp]
mov edx, dword [esi + 4]
movzx ebp, word [esi + 0x24]
lea eax, [ebx + ebx*2]
lea edi, [ecx + eax*8]
mov dword [edi + 8], edx
mov eax, dword [esi + 8]
mov dword [edi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov dword [edi + 0x10], ecx
mov edx, dword [esi + 0x10]
mov dword [edi + 0x14], edx
movzx ebx, word [esi + 0x26]
add ebp, esi
push ebp
lea eax, [esp + 0x20]
call fcn.004037a0
mov ecx, dword [edi]
test ecx, ecx
jne 0x51171b
xor eax, eax
jmp 0x511735
mov eax, ecx
lea ebx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x511720
sub eax, ebx
sar eax, 1
js 0x5117d7
cmp eax, dword [ecx - 8]
jg 0x5117d7
mov dword [ecx - 0xc], eax
mov ecx, dword [edi]
mov word [ecx + eax*2], 0
movzx edx, word [esi + 0x26]
lea eax, [esp + 0x20]
push edi
push eax
lea eax, [esp + 0x24]
lea ebp, [ebp + edx*2]
call fcn.00511410
add esp, 8
test eax, eax
jne 0x511770
lea eax, [esp + 0x1c]
call fcn.0040ab90
movzx ebx, word [esi + 0x28]
add edi, 4
push ebp
mov eax, edi
call fcn.004037a0
mov edx, dword [edi]
test edx, edx
jne 0x511789
xor eax, eax
jmp 0x5117a1
mov eax, edx
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x511790
sub eax, esi
sar eax, 1
js 0x5117d7
cmp eax, dword [edx - 8]
jg 0x5117d7
mov ebx, dword [esp + 0x2c]
mov dword [edx - 0xc], eax
mov ecx, dword [edi]
mov edi, dword [esp + 0x24]
mov word [ecx + eax*2], 0
mov eax, dword [esp + 0x28]
cmp eax, ebx
mov ebp, dword [esp + 0x18]
mov esi, eax
jb 0x511673
jmp 0x5117e9
push 0x8007000e
call fcn.00403650
push 0x80070057
call fcn.00403650
mov ebp, dword [esp + 0x18]
cmp esi, ebx
jb 0x511828
lea ecx, [esp + 0x20]
call fcn.00403870
lea ecx, [esp + 0x1c]
call fcn.00403870
push edi
call fcn.005d2367
add esp, 4
test ebp, ebp
je 0x51180f
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
lea ecx, [esp + 0x20]
call fcn.00403870
lea ecx, [esp + 0x1c]
call fcn.00403870
push edi
call fcn.005d2367
add esp, 4
test ebp, ebp
je 0x51184e
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret