Function at 0x402330
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42318c
mov eax, dword fs:[0]
push eax
sub esp, 0x304
mov eax, dword [0x42f008]
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 dword [ebp - 0x2dc], edx
mov esi, ecx
mov dword [ebp - 0x2d4], esi
lea eax, [ebp - 0x280]
mov dword [ebp - 0x2f8], 0
push eax
push 0x135
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x4023b7
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], 7
mov word [esi], ax
mov eax, esi
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.0040e8ab
mov esp, ebp
pop ebp
ret
xor esi, esi
mov edi, 7
xor eax, eax
mov dword [ebp - 0x284], edi
mov dword [ebp - 0x288], esi
mov word [ebp - 0x298], ax
mov ecx, 0x30
mov dword [ebp - 4], eax
mov dword [ebp - 0x2d0], ecx
or eax, 0xffffffff
sub eax, esi
cmp eax, 1
jbe 0x402885
lea ebx, [esi + 1]
cmp ebx, 0x7ffffffe
ja 0x402885
cmp edi, ebx
jae 0x402417
push esi
push ebx
lea ecx, [ebp - 0x298]
call fcn.00403f60
mov ecx, dword [ebp - 0x2d0]
jmp 0x402436
test ebx, ebx
jne 0x402444
cmp edi, 8
mov dword [ebp - 0x288], ebx
lea eax, [ebp - 0x298]
cmovae eax, dword [ebp - 0x298]
xor edx, edx
mov word [eax], dx
mov esi, dword [ebp - 0x288]
test ebx, ebx
mov edi, dword [ebp - 0x284]
setne al
test al, al
je 0x40248b
cmp edi, 8
lea eax, [ebp - 0x298]
cmovae eax, dword [ebp - 0x298]
mov word [eax + esi*2], cx
lea eax, [ebp - 0x298]
cmp dword [ebp - 0x284], 8
mov dword [ebp - 0x288], ebx
cmovae eax, dword [ebp - 0x298]
xor edx, edx
mov word [eax + ebx*2], dx
mov edi, dword [ebp - 0x284]
mov esi, dword [ebp - 0x288]
inc ecx
mov dword [ebp - 0x2d0], ecx
cmp ecx, 0x39
jle 0x4023e1
mov ecx, 0x61
mov dword [ebp - 0x2d0], ecx
or eax, 0xffffffff
sub eax, esi
cmp eax, 1
jbe 0x402885
lea ebx, [esi + 1]
cmp ebx, 0x7ffffffe
ja 0x402885
cmp edi, ebx
jae 0x4024dc
push esi
push ebx
lea ecx, [ebp - 0x298]
call fcn.00403f60
mov ecx, dword [ebp - 0x2d0]
jmp 0x4024fb
test ebx, ebx
jne 0x402509
cmp edi, 8
mov dword [ebp - 0x288], ebx
lea eax, [ebp - 0x298]
cmovae eax, dword [ebp - 0x298]
xor edx, edx
mov word [eax], dx
mov esi, dword [ebp - 0x288]
test ebx, ebx
mov edi, dword [ebp - 0x284]
setne al
test al, al
je 0x402550
cmp edi, 8
lea eax, [ebp - 0x298]
cmovae eax, dword [ebp - 0x298]
mov word [eax + esi*2], cx
lea eax, [ebp - 0x298]
cmp dword [ebp - 0x284], 8
mov dword [ebp - 0x288], ebx
cmovae eax, dword [ebp - 0x298]
xor edx, edx
mov word [eax + ebx*2], dx
mov edi, dword [ebp - 0x284]
mov esi, dword [ebp - 0x288]
inc ecx
mov dword [ebp - 0x2d0], ecx
cmp ecx, 0x7a
jle 0x4024a6
push 1
xor eax, eax
mov dword [ebp - 0x29c], 7
push 0x4299d8
lea ecx, [ebp - 0x2b0]
mov dword [ebp - 0x2a0], 0
mov word [ebp - 0x2b0], ax
call fcn.00403940
push 0
mov byte [ebp - 4], 1
call fcn.0040f745
push eax
call fcn.0040f355
add esp, 8
xor ebx, ebx
dec esi
mov dword [ebp - 0x2d8], esi
lea esp, [esp]
call fcn.0040f334
xor edx, edx
mov ecx, dword [ebp - 0x2a0]
div esi
cmp edi, 8
lea eax, [ebp - 0x298]
cmovae eax, dword [ebp - 0x298]
movzx eax, word [eax + edx*2]
mov dword [ebp - 0x2d0], eax
or eax, 0xffffffff
sub eax, ecx
cmp eax, 1
jbe 0x402885
lea esi, [ecx + 1]
cmp esi, 0x7ffffffe
ja 0x402885
mov edx, dword [ebp - 0x29c]
cmp edx, esi
jae 0x40260f
push ecx
push esi
lea ecx, [ebp - 0x2b0]
call fcn.00403f60
jmp 0x40262e
test esi, esi
jne 0x40263c
cmp edx, 8
mov dword [ebp - 0x2a0], esi
lea eax, [ebp - 0x2b0]
cmovae eax, dword [ebp - 0x2b0]
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x2a0]
test esi, esi
mov edx, dword [ebp - 0x29c]
setne al
test al, al
je 0x40267d
cmp edx, 8
lea eax, [ebp - 0x2b0]
mov edx, dword [ebp - 0x2d0]
cmovae eax, dword [ebp - 0x2b0]
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x2b0]
cmp dword [ebp - 0x29c], 8
mov dword [ebp - 0x2a0], esi
cmovae eax, dword [ebp - 0x2b0]
xor ecx, ecx
mov word [eax + esi*2], cx
mov esi, dword [ebp - 0x2d8]
inc ebx
cmp ebx, 0xa
jl 0x4025b0
xor eax, eax
mov dword [ebp - 0x2e0], 7
mov dword [ebp - 0x2e4], 0
mov word [ebp - 0x2f4], ax
cmp word [ebp - 0x280], ax
jne 0x4026b7
xor ecx, ecx
jmp 0x4026cf
lea ecx, [ebp - 0x280]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4026c0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x280]
push eax
lea ecx, [ebp - 0x2f4]
call fcn.00403940
lea eax, [ebp - 0x2b0]
mov byte [ebp - 4], 2
push eax
lea edx, [ebp - 0x2f4]
lea ecx, [ebp - 0x310]
call fcn.004045a0
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x2c8]
call fcn.00404620
add esp, 4
cmp dword [ebp - 0x2fc], 8
jb 0x402729
push dword [ebp - 0x310]
call fcn.0040f387
add esp, 4
xor eax, eax
mov dword [ebp - 0x2fc], 7
cmp dword [ebp - 0x2e0], 8
mov dword [ebp - 0x300], 0
mov word [ebp - 0x310], ax
jb 0x40275d
push dword [ebp - 0x2f4]
call fcn.0040f387
add esp, 4
cmp dword [ebp - 0x2b4], 8
lea eax, [ebp - 0x2c8]
push 0x4299e8
cmovae eax, dword [ebp - 0x2c8]
push eax
lea eax, [ebp - 0x2cc]
push eax
call fcn.0040e8ba
mov ecx, dword [ebp - 0x2dc]
add esp, 0xc
cmp dword [ecx + 0x14], 0x10
mov eax, dword [ecx + 0x10]
jb 0x402797
mov ecx, dword [ecx]
push dword [ebp - 0x2cc]
push eax
push 1
push ecx
call fcn.0040f564
push dword [ebp - 0x2cc]
call fcn.0040f6ce
mov ebx, dword [ebp - 0x2d4]
xor eax, eax
add esp, 0x14
mov dword [ebx + 0x14], 7
mov dword [ebx + 0x10], 0
mov word [ebx], ax
mov ecx, dword [ebp - 0x2b4]
cmp ecx, 8
jae 0x4027fc
mov eax, dword [ebp - 0x2b8]
inc eax
je 0x40280e
add eax, eax
push eax
lea eax, [ebp - 0x2c8]
push eax
push ebx
call fcn.0040ebb0
mov ecx, dword [ebp - 0x2b4]
add esp, 0xc
jmp 0x40280e
mov eax, dword [ebp - 0x2c8]
mov dword [ebx], eax
mov dword [ebp - 0x2c8], 0
mov eax, dword [ebp - 0x2b8]
mov dword [ebx + 0x10], eax
xor eax, eax
cmp dword [ebp - 0x29c], 8
mov dword [ebx + 0x14], ecx
mov dword [ebp - 0x2b4], 7
mov dword [ebp - 0x2b8], 0
mov word [ebp - 0x2c8], ax
jb 0x40284e
push dword [ebp - 0x2b0]
call fcn.0040f387
add esp, 4
xor eax, eax
mov dword [ebp - 0x29c], 7
mov dword [ebp - 0x2a0], 0
mov word [ebp - 0x2b0], ax
cmp edi, 8
jb 0x40287e
push dword [ebp - 0x298]
call fcn.0040f387
add esp, 4
mov eax, ebx
jmp 0x40239b
push str.string_too_long
call fcn.0040e84f
int3