Function at 0x46e010
Capabilities:
Check if file exists
Create directory
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x574c66
mov eax, dword fs:[0]
push eax
mov eax, 0x223c
call fcn.004b0ed0
mov eax, dword [0x5dccb4]
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 edi, ecx
mov eax, dword [ebp + 8]
push 0x800
mov dword [ebp - 0x2248], eax
lea eax, [ebp - 0x1a10]
push 0
push eax
call fcn.00516300
add esp, 0xc
lea eax, [ebp - 0x1a10]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor eax, eax
mov dword [ebp - 0x2218], 0
mov dword [ebp - 0x2214], 7
mov word [ebp - 0x2228], ax
lea ecx, [ebp - 0x1a10]
mov dword [ebp - 4], eax
mov dword [ebp - 0x2230], eax
lea edx, [ecx + 2]
mov dword [ebp - 0x222c], 7
mov word [ebp - 0x2240], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46e0b5
sub ecx, edx
lea eax, [ebp - 0x1a10]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2240]
call fcn.00412a70
cmp dword [ebp - 0x2230], 0x104
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov byte [ebp - 4], 1
jbe 0x46e0f4
mov bl, 1
jmp 0x46e1eb
push 0x800
lea eax, [ebp - 0x2210]
push 0
push eax
call fcn.00516300
push 0x800
lea eax, [ebp - 0x1210]
push 0
push eax
call fcn.00516300
cmp dword [ebp - 0x222c], 8
lea eax, [ebp - 0x2240]
cmovae eax, dword [ebp - 0x2240]
push eax
lea eax, [ebp - 0x2210]
push 0x400
push eax
call fcn.00541cac
push 0x100
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00516300
add esp, 0x30
xor esi, esi
nop dword [eax + eax]
push 0x80
lea eax, [ebp - 0x110]
mov ecx, edi
push eax
call fcn.0046e930
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x2210]
push eax
lea eax, [ebp - 0x1210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push str..tmp
lea eax, [ebp - 0x1210]
push 0x400
push eax
call fcn.00541bd7
add esp, 0xc
lea eax, [ebp - 0x1210]
push eax
call ebx
test eax, eax
je 0x46e1be
inc esi
cmp esi, 0xa
jl 0x46e160
mov bl, 1
jmp 0x46e1eb
lea ecx, [ebp - 0x1210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46e1c7
sub ecx, edx
lea eax, [ebp - 0x1210]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2228]
call fcn.00412a70
xor bl, bl
mov edx, dword [ebp - 0x222c]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x46e22f
mov ecx, dword [ebp - 0x2240]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46e225
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46e4b6
push edx
push ecx
call fcn.004b0a8e
add esp, 8
test bl, bl
jne 0x46e453
cmp dword [ebp - 0x2214], 8
lea eax, [ebp - 0x2228]
cmovae eax, dword [ebp - 0x2228]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x46e275
cmp dword [ebp - 0x2214], 8
lea eax, [ebp - 0x2228]
push 0
cmovae eax, dword [ebp - 0x2228]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0x100
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.00516300
push 0x800
lea eax, [ebp - 0xa10]
push 0
push eax
call fcn.00516300
add esp, 0x18
lea eax, [ebp - 0x210]
mov ecx, edi
push 0x80
push eax
call fcn.0046e930
cmp dword [ebp - 0x2214], 8
lea eax, [ebp - 0x2228]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmovae eax, dword [ebp - 0x2228]
push eax
lea eax, [ebp - 0xa10]
push eax
call esi
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0xa10]
push eax
call esi
push str..tmp
lea eax, [ebp - 0xa10]
push 0x400
push eax
call fcn.00541bd7
add esp, 0xc
mov dword [ebp - 0x2230], 0
xor eax, eax
mov dword [ebp - 0x222c], 7
lea ecx, [ebp - 0xa10]
mov word [ebp - 0x2240], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46e324
sub ecx, edx
lea eax, [ebp - 0xa10]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2240]
call fcn.00412a70
cmp dword [ebp - 0x222c], 8
lea eax, [ebp - 0x2240]
push 0x599ea0
cmovae eax, dword [ebp - 0x2240]
push eax
lea eax, [ebp - 0x2244]
mov dword [ebp - 0x2244], 0
push eax
call fcn.00545c44
mov ecx, dword [ebp - 0x2244]
add esp, 0xc
test ecx, ecx
jne 0x46e38e
call fcn.00533819
mov esi, dword [eax]
neg esi
jmp 0x46e3c1
mov eax, dword [ebp - 0x2248]
cmp dword [eax + 0x14], 0x10
lea ebx, [eax + 0x10]
jb 0x46e39f
mov eax, dword [eax]
push ecx
push dword [ebx]
push 1
push eax
call fcn.00548e09
push dword [ebp - 0x2244]
mov esi, eax
call fcn.00545755
xor eax, eax
add esp, 0x14
cmp esi, dword [ebx]
cmovne esi, eax
mov edx, dword [ebp - 0x222c]
cmp edx, 8
jb 0x46e401
mov ecx, dword [ebp - 0x2240]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46e3f7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46e4bb
push edx
push ecx
call fcn.004b0a8e
add esp, 8
test esi, esi
jle 0x46e453
cmp dword [ebp - 0x2214], 8
lea eax, [ebp - 0x2228]
cmovae eax, dword [ebp - 0x2228]
push eax
lea eax, [ebp - 0xa10]
push eax
call fcn.004ed7e0
add esp, 8
test eax, eax
js 0x46e453
lea eax, [ebp - 0x2228]
cmp edi, eax
je 0x46e453
cmp dword [ebp - 0x2214], 8
mov ecx, edi
push dword [ebp - 0x2218]
cmovae eax, dword [ebp - 0x2228]
push eax
call fcn.00412a70
cmp dword [edi + 0x10], 0
mov edx, dword [ebp - 0x2214]
setne bl
cmp edx, 8
jb 0x46e496
mov ecx, dword [ebp - 0x2228]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46e48c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46e4c0
push edx
push ecx
call fcn.004b0a8e
add esp, 8
mov al, bl
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.004b0a78
mov esp, ebp
pop ebp
ret 4
call fcn.00533703
call fcn.00533703
call fcn.00533703
int3