Function at 0x4be990
Capabilities:
Access peb ldr_data
Check if file exists
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5980bb
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x61e69c]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x23c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x24c]
push str.eQW
mov dword [esp + 0x28], ebp
call fcn.0049d036
add esp, 4
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x36]
push ecx
mov word [esp + 0x38], ax
call fcn.004fe380
add esp, 0xc
push 0x208
lea edx, [esp + 0x30]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x2c]
push eax
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 + 0x14], eax
push str.MobileInfo2.dat
lea ecx, [esp + 0x30]
push ecx
push 0x5d7f74
lea edi, [esp + 0x20]
mov dword [esp + 0x250], 0
call fcn.00407710
mov esi, dword [esp + 0x20]
add esp, 0xc
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push 0
push 0x80
test eax, eax
je 0x4bea71
push 5
jmp 0x4bea73
push 2
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
or ebx, 0xffffffff
cmp edi, ebx
je 0x4bead8
cmp dword [ebp + 0xa4], 0
ja 0x4beab0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
mov dword [esp + 0x244], ebx
lea edx, [eax + 0xc]
lock xadd dword [edx], ebx
dec ebx
jmp 0x4beaea
push 0
lea ecx, [esp + 0x1c]
push ecx
push 4
lea edx, [esp + 0x34]
push edx
push edi
mov dword [esp + 0x3c], 0x44c
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4beb24
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
mov dword [esp + 0x244], ebx
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x4beaf8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x23c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.004f673f
add esp, 0x234
ret 4
mov ebx, dword [esp + 0x18]
push 0
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebx
je 0x4beb4f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
call fcn.00406760
mov eax, 1
jmp 0x4beafa
mov eax, dword [ebp + 0xa0]
mov ecx, dword [eax]
mov esi, dword [ebp + 0x88]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], esi
jmp 0x4beb70
mov edx, dword [esp + 0x24]
mov ebp, dword [ebp + 0xa0]
mov eax, dword [edx + 0x88]
test esi, esi
je 0x4beb88
cmp esi, eax
je 0x4beb8d
call fcn.004f825e
cmp dword [esp + 0x20], ebp
je 0x4bec26
test esi, esi
jne 0x4bebf7
call fcn.004f825e
mov eax, dword [esp + 0x20]
cmp eax, dword [esi + 0x18]
jne 0x4bebae
call fcn.004f825e
mov edx, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x1c]
push ecx
push 0x44c
add edx, 0x10
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4bebfb
add ebx, dword [esp + 0x18]
push 0
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebx
jne 0x4bebfb
lea esi, [esp + 0x1c]
call fcn.00430d50
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x24]
jmp 0x4beb70
mov esi, dword [esi]
jmp 0x4beba0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x244], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4beaec
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x244], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4bec58
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x4beafa