Function at 0x405230
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a2f1
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x554418]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x444], ebx
push 0x208
push 0
mov dword [ebp - 0x448], ebx
push ebx
mov dword [ebp - 0x444], 0
call fcn.004d3ba0
lea edi, [ebx + 0x208]
add esp, 0xc
lea esi, [edi + 4]
mov dword [ebp - 0x43c], edi
mov ecx, esi
mov dword [ebp - 0x44c], esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004092e0
mov dword [esi], eax
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.004085e0
push 0x208
lea eax, [ebp - 0x420]
mov dword [ebp - 4], 1
push 0
push eax
call fcn.004d3ba0
add esp, 0xc
mov dword [ebp - 0x43c], 0
lea eax, [ebp - 0x43c]
push eax
push 0x4075f0
push 6
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004d3ba0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push dword [ebp - 0x43c]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x420]
mov edx, 0x104
lea esi, [ebp - 0x218]
mov eax, ecx
sub esi, eax
nop word [eax + eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x40536e
movzx eax, word [esi + ecx]
test ax, ax
je 0x40536e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x405350
mov esi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ecx - 2]
test edx, edx
push str.Utils_sup_dri_
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x420]
push eax
push ebx
call esi
push ebx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4053a3
push ebx
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004d3ba0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x516ad4
push ebx
push eax
call esi
xor eax, eax
mov byte [ebp - 4], 2
push eax
push 0x51699c
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 7
mov word [ebp - 0x438], ax
call fcn.00409b90
lea eax, [ebp - 0x440]
mov dword [ebp - 0x444], 1
push eax
mov dword [ebp - 0x440], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.00407630
add esp, 8
test eax, eax
je 0x405496
mov esi, dword [ebp - 0x440]
lea eax, [ebp - 0x43c]
push eax
mov dword [ebp - 0x43c], 0
push dword [esi]
call sub.ADVAPI32.dll_ConvertSidToStringSidW
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x405493
mov edx, dword [ebp - 0x43c]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x440], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405461
sub ecx, dword [ebp - 0x440]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x438]
call fcn.00409b90
push dword [ebp - 0x43c]
call edi
mov dword [ebp - 0x43c], 0
push esi
call edi
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4054fb
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x440]
push 0
push eax
mov eax, dword [ebp - 0x428]
lea ecx, [ebp - 0x438]
cmovae ecx, dword [ebp - 0x438]
add eax, eax
push eax
push ecx
push esi
mov dword [ebp - 0x440], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x424]
cmp edx, 8
jb 0x405537
mov ecx, dword [ebp - 0x438]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40552d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405555
push edx
push ecx
call fcn.0043ee21
add esp, 8
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043f0c9
mov esp, ebp
pop ebp
ret
call fcn.004d7009
int3