Function at 0x4bec70
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x595a91
mov eax, dword fs:[0]
push eax
sub esp, 0x690
mov eax, dword [0x61e69c]
xor eax, esp
mov dword [esp + 0x688], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x6a4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x6b4]
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x49e]
push edx
mov dword [esp + 0x34], eax
mov word [esp + 0x4a0], cx
call fcn.004fe380
add esp, 0xc
push 0x208
lea eax, [esp + 0x498]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x494]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov edx, dword [0x6285c4]
mov eax, dword [edx + 0xc]
mov ecx, 0x6285c4
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
push str.MobileInfo2.dat
lea ecx, [esp + 0x498]
push ecx
push 0x5d7f74
lea edi, [esp + 0x24]
mov dword [esp + 0x6b8], 0
call fcn.00407710
mov ebx, dword [esp + 0x24]
add esp, 0xc
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4bed71
lea eax, [ebx - 0x10]
mov dword [esp + 0x6ac], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4bee14
mov ecx, dword [eax]
push eax
jmp 0x4bee0d
push 0
push 0x80
push 3
push 0
push 0
push bind
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x4bedf1
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 4
push 0x1000
push 4
push 0
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edi, eax
mov edx, edi
lea esi, [esp + 0x2c]
call fcn.0048f560
push 0
lea ecx, [esp + 0x20]
push ecx
push 4
push edi
push ebp
mov byte [esp + 0x6c0], 1
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4bee40
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, esi
push edx
call fcn.0048f650
add esp, 4
add ebx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [ebx + 0xc]
mov dword [esp + 0x6ac], ecx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4bee14
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x6a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x688]
xor ecx, esp
call fcn.004f673f
add esp, 0x69c
ret 4
cmp dword [esp + 0x1c], 4
je 0x4bee66
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x2c]
push ecx
call fcn.0048f650
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00406760
jmp 0x4bee14
mov edi, dword [edi]
cmp edi, 0x44c
je 0x4bee7e
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x2c]
push edx
jmp 0x4bee53
mov eax, dword [esp + 0x24]
add eax, 0xfffffffc
mov ebx, 4
cmp eax, 0x44c
jb 0x4befb5
xor edi, edi
push edi
push edi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp ebx, eax
jne 0x4bee70
push 4
push 0x1000
push 0x44c
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
lea ecx, [esp + 0x20]
push ecx
push 0x44c
mov esi, eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4befdc
cmp dword [esp + 0x1c], 0x44c
jne 0x4bee47
push 0x40
lea edx, [esp + 0x54]
push edi
push edx
mov dword [esp + 0x50], edi
call fcn.004fe380
add esp, 0xc
push 0x400
lea eax, [esp + 0x94]
push edi
push eax
call fcn.004fe380
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov ecx, 0x113
lea edi, [esp + 0x50]
lea eax, [esp + 0x9c]
add esp, 0xc
rep movsd dword es:[edi], dword [esi]
add ebx, 0x44c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4bef30
sub eax, edx
sar eax, 1
je 0x4befa3
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x94]
call fcn.004066b0
mov edx, dword [esp + 0x28]
add edx, 0x88
push edx
lea ecx, [esp + 0x24]
mov byte [esp + 0x6b0], 2
call fcn.004c0a00
mov edi, eax
mov ecx, 0x113
lea esi, [esp + 0x44]
rep movsd dword es:[edi], dword [esi]
mov byte [esp + 0x6ac], 1
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 0x4befa3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
sub ecx, ebx
cmp ecx, 0x44c
jae 0x4bee95
lea edx, [esp + 0x2c]
push edx
call fcn.0048f650
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x18]
call fcn.00406760
mov eax, 1
jmp 0x4bee16
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x2c]
push eax
jmp 0x4bee53