Function at 0x40d850
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
lea ecx, [ebp - 0x18]
push edi
lea edx, [ebp - 0x5c]
push esi
push ebx
sub esp, 0x8c
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x3c], ecx
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x18]
mov dword [esp], edx
mov dword [ebp - 0x34], esp
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x44], sym.___gxx_personality_sj0
mov dword [ebp - 0x40], 0x520014
mov dword [ebp - 0x38], 0x40d9ee
call sym.__Unwind_SjLj_Register
mov dword [ebp - 0x28], 0x55e928
mov dword [esp], 0x55e928
mov dword [ebp - 0x58], 0xffffffff
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [ebp + 8]
sub esp, 4
mov dword [esp], 0x55e940
mov dword [esp + 4], eax
call method.std::_Rb_tree_void__std::pair_void_const__DC_FILEMAP___std::_Select1st_std::pair_void_const__DC_FILEMAP_____std::less_void___std::allocator_std::pair_void_const__DC_FILEMAP_____.find_void_const_
mov dword [ebp - 0x6c], 0
cmp eax, 0x55e944
mov dword [ebp - 0x70], 0
jne 0x40d921
mov dword [ebp - 0x6c], 0xffffffff
mov ebx, dword [ebp - 0x70]
mov esi, dword [ebp - 0x68]
add ebx, 0x10
mov word [esi + 4], bx
shr ebx, 0x10
mov byte [esi + 6], bl
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x58], 0xffffffff
mov dword [esp], eax
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
lea ecx, [ebp - 0x5c]
mov dword [esp], ecx
call sym.__Unwind_SjLj_Unregister
mov eax, dword [ebp - 0x6c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [eax + 0x14]
mov dword [esp], 0
mov dword [ebp - 0x74], ebx
call sym._time
mov edx, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x74]
mov dword [edx + 0x94], eax
mov eax, dword [ebp - 0x60]
mov edx, dword [eax]
mov eax, dword [ecx + 0x90]
cmp edx, eax
jae 0x40d8e3
mov edi, dword [ebp - 0x64]
sub eax, edx
mov esi, dword [edi]
mov dword [ebp - 0x78], esi
cmp eax, esi
ja 0x40d95f
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x74]
xor edx, edx
mov dword [esp + 4], edx
mov ecx, dword [eax + 0x80]
mov dword [ebp - 0x58], 1
mov dword [esp], ecx
call sub.KERNEL32.dll_GetFileSize
mov ebx, dword [ebp - 0x74]
sub esp, 8
cmp dword [ebx + 0x90], eax
jne 0x40d8e3
mov esi, dword [ebp - 0x68]
mov edx, dword [ebp - 0x78]
mov edi, dword [ebp - 0x64]
movzx eax, word [esi + 2]
mov dword [edi], edx
cmp ax, 1
je 0x40da41
test ax, ax
je 0x40da1e
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x78]
mov edi, dword [ebp - 0x60]
mov word [eax + 2], 0
mov edx, dword [ebp - 0x74]
mov eax, dword [ebp + 0x14]
mov dword [esp + 8], ecx
mov esi, dword [edi]
mov ebx, dword [edx + 0x88]
mov dword [esp], eax
add esi, ebx
mov dword [esp + 4], esi
mov dword [ebp - 0x58], 1
call sym._memmove
mov esi, dword [ebp - 0x78]
mov dword [ebp - 0x70], esi
jmp 0x40d8e3
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x74]
mov dword [esp + 8], eax
mov esi, dword [ebp + 0x14]
mov ebx, dword [ecx]
mov edi, dword [edx + 0x88]
mov dword [esp], esi
add ebx, edi
mov dword [esp + 4], ebx
jmp 0x40d9d7
mov eax, edx
add eax, 0x800
cmp eax, dword [0x55e920]
jg 0x40daa3
mov ecx, dword [0x55e924]
mov edi, dword [ebp - 0x78]
mov esi, dword [ebp - 0x60]
mov dword [esp + 8], ecx
mov ebx, dword [ebp - 0x74]
mov dword [esp + 4], edi
mov eax, dword [esi]
mov edx, dword [ebx + 0x88]
mov dword [ebp - 0x58], 1
add eax, edx
mov dword [esp], eax
call sym.CpsLzo_char_const__int__char_
mov dword [ebp - 0x7c], eax
test eax, eax
je 0x40dac1
cmp eax, 0xfa000
jle 0x40dafc
mov dword [ebp - 0x78], 0
mov eax, dword [ebp - 0x68]
mov word [eax + 2], 0
jmp 0x40d9e3
mov dword [0x55e920], eax
mov ecx, dword [0x55e924]
mov dword [esp + 4], eax
mov dword [esp], ecx
call sym._realloc
mov dword [0x55e924], eax
jmp 0x40da50
mov edi, dword [ebp - 0x78]
mov esi, dword [ebp - 0x60]
mov edx, dword [ebp - 0x74]
mov dword [esp + 8], edi
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi]
mov ebx, dword [edx + 0x88]
mov dword [esp], ecx
mov dword [ebp - 0x58], 1
add eax, ebx
mov dword [esp + 4], eax
call sym._memmove
mov ecx, dword [ebp - 0x68]
mov word [ecx + 2], 0
jmp 0x40d9e3
mov dword [ebp - 0x58], 1
mov esi, dword [ebp - 0x7c]
mov ebx, dword [0x55e924]
mov edx, dword [ebp + 0x14]
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], edx
call sym._memmove
mov edi, dword [ebp - 0x7c]
mov dword [ebp - 0x78], edi
jmp 0x40d9e3