Function at 0x4606d0
Capabilities:
Check if file exists
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49c726
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x4c3718]
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 esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x254], ecx
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x46071b
mov eax, dword [esi]
jmp 0x46071d
mov eax, esi
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor edx, edx
mov word [eax], dx
cmp dword [ecx + 0x10], edx
je 0x460b23
push 0x20a
push edx
lea eax, [ebp - 0x21c]
push eax
call fcn.00474170
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor eax, eax
mov dword [ebp - 0x238], 7
mov dword [ebp - 0x23c], 0
mov word [ebp - 0x24c], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x24c]
push eax
call fcn.00460fe0
add esp, 4
lea ecx, [ebp - 0x24c]
push 4
push str..ico
call fcn.0040cb90
xor eax, eax
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
cmp word [ebp - 0x21c], ax
jne 0x4607c3
xor ecx, ecx
jmp 0x4607df
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4607d0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x234]
call fcn.00404000
mov byte [ebp - 4], 1
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x24c]
push eax
lea ecx, [ebp - 0x234]
call fcn.0040ca80
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
push eax
call ebx
test eax, eax
je 0x4608e7
cmp dword [ebp - 0x238], 8
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x23c], 0
cmovae eax, dword [ebp - 0x24c]
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x234]
cmp dword [ebp - 0x220], 8
mov dword [ebp - 0x224], ecx
cmovae eax, dword [ebp - 0x234]
mov word [eax], cx
lea eax, [ebp - 0x24c]
push eax
call fcn.00460fe0
add esp, 4
lea ecx, [ebp - 0x24c]
push 4
push str..ico
call fcn.0040cb90
cmp word [ebp - 0x21c], 0
jne 0x4608b0
xor ecx, ecx
lea eax, [ebp - 0x21c]
push ecx
push eax
lea ecx, [ebp - 0x234]
call fcn.00404000
jmp 0x4607f6
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4608c0
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x234]
call fcn.00404000
jmp 0x4607f6
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push 0
cmovae eax, dword [ebp - 0x234]
push 0x80
push 2
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x46097d
mov eax, dword [ebp - 0x220]
cmp eax, 8
jb 0x460939
inc eax
lea ecx, [ebp - 0x234]
push eax
push dword [ebp - 0x234]
call fcn.00404150
xor eax, eax
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x224], 0
cmp eax, 8
jb 0x460b23
inc eax
lea ecx, [ebp - 0x24c]
push eax
push dword [ebp - 0x24c]
call fcn.00404150
jmp 0x460b23
mov ecx, dword [ebp - 0x254]
lea eax, [ebp - 0x250]
push 0
push eax
mov dword [ebp - 0x250], 0
push dword [ecx + 0x10]
call fcn.004610a0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x460a0c
mov eax, dword [ebp - 0x220]
cmp eax, 8
jb 0x4609c8
inc eax
lea ecx, [ebp - 0x234]
push eax
push dword [ebp - 0x234]
call fcn.00404150
xor eax, eax
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x224], 0
cmp eax, 8
jb 0x460b03
inc eax
lea ecx, [ebp - 0x24c]
push eax
push dword [ebp - 0x24c]
call fcn.00404150
jmp 0x460b03
lea eax, [ebp - 0x234]
cmp esi, eax
je 0x460a22
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
call fcn.00403ee0
mov eax, dword [ebp - 0x220]
cmp eax, 8
jb 0x460a84
mov ecx, dword [ebp - 0x234]
inc eax
cmp eax, 0x7fffffff
jbe 0x460a40
call fcn.00478b61
add eax, eax
cmp eax, 0x1000
jb 0x460a7b
test byte [ebp - 0x234], 0x1f
je 0x460a57
call fcn.00478b61
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x460a63
call fcn.00478b61
sub ecx, eax
cmp ecx, 4
jae 0x460a6f
call fcn.00478b61
cmp ecx, 0x23
jbe 0x460a79
call fcn.00478b61
mov ecx, eax
push ecx
call fcn.004729a5
add esp, 4
xor eax, eax
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x224], 0
cmp eax, 8
jb 0x460b03
mov ecx, dword [ebp - 0x24c]
inc eax
cmp eax, 0x7fffffff
jbe 0x460abf
call fcn.00478b61
add eax, eax
cmp eax, 0x1000
jb 0x460afa
test byte [ebp - 0x24c], 0x1f
je 0x460ad6
call fcn.00478b61
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x460ae2
call fcn.00478b61
sub ecx, eax
cmp ecx, 4
jae 0x460aee
call fcn.00478b61
cmp ecx, 0x23
jbe 0x460af8
call fcn.00478b61
mov ecx, eax
push ecx
call fcn.004729a5
add esp, 4
xor eax, eax
mov dword [ebp - 0x238], 7
push edi
mov word [ebp - 0x24c], ax
mov dword [ebp - 0x23c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x14], 8
jb 0x460b2b
mov esi, dword [esi]
push esi
call 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.00472961
mov esp, ebp
pop ebp
ret