Function at 0x4be0b0
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x595b36
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x61e69c]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x250]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x5c]
mov dword [esp + 0x28], esi
test eax, eax
ja 0x4be102
cmp dword [esi + 0x1c], 0
jbe 0x4be201
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x4e]
push ecx
mov word [esp + 0x50], ax
call fcn.004fe380
add esp, 0xc
push 0x208
lea edx, [esp + 0x48]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x44]
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 + 0x1c], eax
push str.MobileInfo1.dat
lea ecx, [esp + 0x48]
push ecx
push 0x5d7f74
lea edi, [esp + 0x28]
mov dword [esp + 0x264], 0
call fcn.00407710
mov edi, dword [esp + 0x28]
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4be18a
call fcn.0049bd8c
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x34], ebx
cmp ebx, 0xffffffff
je 0x4be587
push 0
lea edx, [esp + 0x24]
push edx
push 4
lea eax, [esp + 0x4c]
push eax
push ebx
mov dword [esp + 0x54], 0x3fc8
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4be208
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x258], 0xffffffff
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4be201
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x4be5b3
mov eax, dword [esp + 0x20]
push 0
push 0
push eax
mov ebp, eax
push ebx
mov dword [esp + 0x34], ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebp
jne 0x4be1d3
mov eax, dword [esi + 0x58]
mov ebp, dword [eax]
mov esi, dword [esi + 0x40]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], esi
mov ecx, dword [esp + 0x28]
mov edi, dword [ecx + 0x58]
mov eax, dword [ecx + 0x40]
test esi, esi
je 0x4be244
cmp esi, eax
je 0x4be24d
call fcn.004f825e
mov ecx, dword [esp + 0x28]
cmp ebp, edi
je 0x4be37f
test esi, esi
jne 0x4be2b0
call fcn.004f825e
xor eax, eax
cmp ebp, dword [eax + 0x18]
jne 0x4be26a
call fcn.004f825e
lea edx, [esp + 0x18]
lea ecx, [ebp + 0x58]
push edx
call fcn.004066b0
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 0
jne 0x4be2b4
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4be307
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x2c]
call fcn.00430ce0
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
jmp 0x4be232
mov eax, dword [esi]
jmp 0x4be260
test esi, esi
jne 0x4be31d
call fcn.004f825e
cmp ebp, dword [esi + 0x18]
jne 0x4be2c7
call fcn.004f825e
push 0
lea ecx, [esp + 0x24]
push ecx
push 0x3fc8
add ebp, 0x18
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4be321
mov esi, dword [esp + 0x24]
add esi, dword [esp + 0x20]
push 0
push 0
push esi
push ebx
mov dword [esp + 0x34], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, esi
jne 0x4be35f
lea ecx, [esp + 0x18]
call fcn.00406760
lea esi, [esp + 0x2c]
call fcn.00430ce0
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
jmp 0x4be232
mov esi, dword [esi]
jmp 0x4be2bd
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4be348
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x258], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
jmp 0x4be1e8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x18]
call fcn.00406760
lea ecx, [esp + 0x1c]
call fcn.00406760
xor eax, eax
jmp 0x4be5b3
mov eax, dword [ecx + 0x18]
mov edi, dword [eax]
mov ebx, dword [ecx]
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], ebx
mov edi, edi
mov eax, dword [esp + 0x28]
mov esi, dword [eax + 0x18]
mov eax, dword [eax]
test ebx, ebx
je 0x4be3a1
cmp ebx, eax
je 0x4be3a6
call fcn.004f825e
cmp edi, esi
je 0x4be578
test ebx, ebx
jne 0x4be465
call fcn.004f825e
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x4be3c7
call fcn.004f825e
mov eax, dword [edi + 0xc]
sub eax, 0x10
call fcn.004073f0
lea esi, [eax + 0x10]
mov dword [esp + 0x18], esi
mov byte [esp + 0x258], 1
mov ebp, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebp
or eax, ecx
jge 0x4be404
mov ecx, ebp
lea eax, [esp + 0x18]
call fcn.004073a0
mov esi, dword [esp + 0x18]
lea ecx, [ebp + 1]
push ecx
push esi
call fcn.004f8c9d
add esp, 8
test ebp, ebp
jl 0x4be56e
cmp ebp, dword [esi - 8]
jg 0x4be56e
xor edx, edx
mov dword [esi - 0xc], ebp
mov word [esi + ebp*2], dx
cmp dword [esi - 0xc], edx
jl 0x4be46c
push str.VID_05AC
push esi
call fcn.004f7373
add esp, 8
test eax, eax
je 0x4be46c
sub eax, esi
sar eax, 1
js 0x4be46c
lea eax, [esi - 0x10]
mov byte [esp + 0x258], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4be518
mov eax, dword [ebx]
jmp 0x4be3bd
push 0x3fc8
call fcn.004f78be
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4be448
call fcn.0041a520
test ebx, ebx
jne 0x4be53a
call fcn.004f825e
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x4be49d
call fcn.004f825e
mov eax, dword [edi + 0xc]
push 0x20
push eax
push ebp
call fcn.004f8077
push 0
call fcn.004f8fbf
mov ebx, dword [esp + 0x44]
add esp, 0x10
push 0
lea ecx, [esp + 0x24]
push ecx
push 0x3fc8
push ebp
push ebx
mov dword [ebp + 0x3910], eax
mov dword [ebp + 0x3914], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4be541
mov edi, dword [esp + 0x24]
add edi, dword [esp + 0x20]
push 0
push 0
push edi
push ebx
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
cmp eax, edi
jne 0x4be542
call fcn.004f6734
lea eax, [esi - 0x10]
add esp, 4
mov byte [esp + 0x258], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4be524
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x38]
call fcn.0047e330
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
jmp 0x4be390
mov eax, dword [ebx]
jmp 0x4be493
push ebp
call fcn.004f6734
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
mov byte [esp + 0x258], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4be33c
push 0x80070057
call fcn.00401050
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x1c]
lea eax, [edi - 0x10]
mov dword [esp + 0x258], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4be5ae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x250]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.004f673f
add esp, 0x248
ret