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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2038
call fcn.004480b0
mov eax, dword [0x6610e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, 0x208
lea eax, [ebp - 0x61c]
push esi
xor ebx, ebx
push ebx
push eax
call fcn.004a2e40
push str.C:log_
mov edi, 0x104
lea eax, [ebp - 0x61c]
push edi
push eax
call fcn.004b4e55
push 0x800
lea eax, [ebp - 0x1028]
push ebx
push eax
call fcn.004a2e40
push 0x5e1980
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push str._s_s.log
push eax
call fcn.0047d86a
add esp, 0x34
call fcn.00486397
test al, al
je 0x489dfb
pop eax
pop ecx
push ebp
push edi
pop ecx
push esp
pop edx
pop ebp
pop edx
pop esp
push eax
push ebx
push ebx
push edx
push esp
push edx
push esi
lea eax, [ebp - 0x824]
push ebx
push eax
call fcn.004a2e40
push esi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.004a2e40
add esp, 0x18
lea eax, [ebp - 0x20c]
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x20c]
push eax
call fcn.004a6baf
pop ecx
test eax, eax
je 0x48a052
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.004a5de6
pop ecx
pop ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x48a052
lea eax, [ebp - 0x20c]
push eax
call fcn.004a6baf
lea ecx, [ebp - 0x20a]
lea eax, [ecx + eax*2]
push eax
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.004b4e55
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push str._s_s.txt
push eax
call fcn.0047d86a
lea eax, [ebp + 0xc]
push eax
push ebx
push dword [ebp + 8]
lea eax, [ebp - 0x1028]
push 0x3ff
push 0x400
push eax
call fcn.00404700
push ebx
call fcn.004b0b15
mov dword [ebp - 0x2038], eax
lea eax, [ebp - 0x2038]
push eax
mov dword [ebp - 0x2034], edx
call fcn.004b57d5
add esp, 0x40
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
test esi, esi
je 0x48a052
lea ecx, [ebp - 0x1028]
push ecx
push eax
push dword [esi]
mov eax, dword [esi + 0x10]
push dword [esi + 4]
inc eax
push dword [esi + 8]
push dword [esi + 0xc]
push eax
mov eax, dword [esi + 0x14]
add eax, 0x76c
push eax
lea eax, [ebp - 0x2028]
push str.__d__d__d__d__d__d___d_:_s
push eax
call fcn.00489b1e
add esp, 0x28
call fcn.004864ab
test al, al
je 0x489f56
push esp
push edi
pop ebx
pop ecx
pop esp
pop ebx
pop ebx
push ecx
pop ebp
pop eax
pop ebp
push ebx
pop ebx
pop edx
push ebp
push ebx
pop edi
pop eax
push ebx
push edx
pop edx
pop eax
pop edi
push ebp
pop edx
push ebp
push ebx
pop ebp
push ebx
pop edx
pop esi
call fcn.00485f47
test al, al
je 0x489f78
pop edx
push ecx
push ebp
pop edx
push esp
push esp
push edx
push esi
pop eax
push esi
pop ebx
pop ecx
pop esi
pop ebx
push edi
pop edi
push ecx
push esi
pop edi
pop edi
push ecx
push esp
pop ebp
push ebp
push edi
call fcn.004861f9
test al, al
je 0x489f9d
pop edx
push ecx
pop ebp
pop ebx
pop ebp
pop eax
pop ebx
push edi
push edx
push esi
pop edi
push eax
push edx
push edi
push esi
push esp
pop ebp
push ecx
push edx
pop eax
pop ebp
pop esi
push ecx
pop ecx
push ebx
pop edi
push edi
pop ebp
xor eax, eax
mov word [ebp - 0x82a], ax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push 0
xor ebx, ebx
pop esi
inc ebx
test eax, eax
lea eax, [ebp - 0x414]
push 0x5f1518
push eax
cmovne esi, ebx
call fcn.004a6ff4
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x48a052
test esi, esi
jne 0x489ff8
push edi
push 2
lea eax, [ebp - 0x2030]
mov dword [ebp - 0x2030], 0xfeff
push ebx
push eax
call fcn.004a7d8e
add esp, 0x10
lea eax, [ebp - 0x2028]
push eax
call fcn.004a6baf
push edi
add eax, eax
push eax
lea eax, [ebp - 0x2028]
push ebx
push eax
call fcn.004a7d8e
push edi
push 2
lea eax, [ebp - 0x202c]
mov dword [ebp - 0x202c], 0xd
push ebx
push eax
call fcn.004a7d8e
push edi
push 2
lea eax, [ebp - 0x202c]
mov dword [ebp - 0x202c], 0xa
push ebx
push eax
call fcn.004a7d8e
push edi
call fcn.004a6d9c
add esp, 0x38
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00447f5d
mov esp, ebp
pop ebp
ret