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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1888
call fcn.0051d7f0
mov eax, dword [0x594ccc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x1862
mov dword [ebp - 0x1874], ecx
mov ecx, dword [ebp + 0x14]
lea edx, [ebp - 0x1868]
push 0
push edx
mov dword [ebp - 0x1878], eax
mov dword [ebp - 0x187c], ecx
call fcn.0051d250
add esp, 0xc
cmp dword [ebx], 0
mov byte [ebp - 0x1864], 0x62
jne 0x4843b3
push 0
call fcn.0051ef0a
add esp, 4
mov dword [ebx], eax
mov eax, dword [ebx]
mov edx, dword [ebx + 8]
mov ecx, dword [ebx + 4]
lea edi, [ebx + 0xc]
mov dword [ebp - 0x1863], eax
mov eax, edi
mov dword [ebp - 0x185b], edx
mov dword [ebp - 0x185f], ecx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4843d5
sub eax, edx
sar eax, 1
lea esi, [eax + eax]
mov dword [ebp - 0x1857], esi
test esi, esi
je 0x484407
push esi
lea eax, [ebp - 0x1853]
push edi
push eax
call fcn.0051f280
add esp, 0xc
add esi, 4
jmp 0x48440c
mov esi, 4
lea edx, [ebx + 0x4c]
mov eax, edx
lea esi, [ebp + esi - 0x1857]
lea edi, [eax + 2]
jmp 0x484420
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x484420
sub eax, edi
sar eax, 1
lea edi, [eax + eax]
mov dword [esi], edi
test edi, edi
je 0x48444b
push edi
push edx
lea ecx, [esi + 4]
push ecx
call fcn.0051f280
add esp, 0xc
add edi, 4
jmp 0x484450
mov edi, 4
lea edx, [ebx + 0x84c]
mov eax, edx
add esi, edi
lea edi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x484460
sub eax, edi
sar eax, 1
lea edi, [eax + eax]
mov dword [esi], edi
test edi, edi
je 0x48448b
push edi
push edx
lea edx, [esi + 4]
push edx
call fcn.0051f280
add esp, 0xc
add edi, 4
jmp 0x484490
mov edi, 4
mov eax, dword [ebx + 0x184c]
add esi, edi
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
add esi, 4
mov byte [esi], 0x65
lea ecx, [ebp - 0x1868]
sub esi, ecx
inc esi
lea edx, [esi - 4]
mov dword [ebp - 0x1880], esi
mov dword [ebp - 0x1868], edx
test eax, eax
je 0x4844c3
cmp eax, esi
jne 0x4844e9
mov esi, dword [ebp - 0x1874]
lea ebx, [esi + 4]
push ebx
mov dword [ebp - 0x1870], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esi + 0x20]
cmp dword [edi - 0xc], 0
jne 0x4844fe
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [0x5979d8]
mov dword [ebp - 0x186c], 0
test eax, eax
jne 0x48451b
call fcn.0044ef40
mov dword [0x5979d8], eax
mov eax, dword [eax + 0x140]
cmp eax, 2
jne 0x48453b
mov eax, dword [0x5979d8]
mov ecx, dword [eax + 0x140]
cmp ecx, 2
jne 0x48453b
mov eax, dword [eax + 0x24]
jmp 0x48453d
xor eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
push 3
push 0
push 1
push 0x40000000
push edi
test eax, eax
je 0x48455b
call eax
jmp 0x48455d
call ebx
test eax, eax
je 0x484570
cmp eax, 0xffffffff
je 0x484570
mov edi, eax
mov dword [ebp - 0x186c], edi
jmp 0x4845d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4845a8
mov ecx, esi
call fcn.004841f0
mov eax, dword [esi + 0x20]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call ebx
cmp eax, 0xffffffff
jne 0x484566
call fcn.00414c40
test eax, eax
je 0x4845d3
mov eax, dword [ebp - 0x1870]
mov edx, dword [ebp - 0x187c]
push eax
mov byte [edx], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 0x10
mov edi, dword [ebp - 0x186c]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_LockFile]
test eax, eax
je 0x484606
mov ebx, dword [ebp - 0x1878]
mov eax, dword [ebx]
mov dword [ebp - 0x1874], edi
cmp eax, 0xffffffff
je 0x484633
push 0
push 0
push eax
jmp 0x48463c
test edi, edi
je 0x484611
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1870]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 0x10
inc dword [esi + 0x28]
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x484692
mov ecx, esi
call fcn.00450170
cmp edi, 0xffffffff
je 0x484665
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
test edi, edi
je 0x484670
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1870]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 0x1880]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x1884]
push eax
push ecx
lea edx, [ebp - 0x1868]
push edx
push edi
call ebx
test eax, eax
jne 0x4846fe
call fcn.00414c40
test eax, eax
je 0x4846fe
mov ecx, esi
call fcn.00450170
lea ecx, [ebp - 0x1874]
call fcn.00414f60
lea ecx, [ebp - 0x186c]
call fcn.00438c80
mov eax, dword [ebp - 0x1870]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x48472b
push 0
lea ecx, [ebp - 0x1888]
push ecx
push 8
add esi, 0x28
push esi
push edi
call ebx
test eax, eax
jne 0x48472b
call fcn.00414c40
lea ecx, [ebp - 0x186c]
call fcn.0041a9f0
lea ecx, [ebp - 0x1874]
call fcn.00414f60
lea ecx, [ebp - 0x186c]
call fcn.00438c80
mov edx, dword [ebp - 0x1870]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 0x10