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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x694
mov eax, dword [0x40f054]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x62c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x638], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x630], eax
mov eax, dword [ebp + 0x18]
push esi
mov dword [ebp - 0x63c], eax
mov esi, ecx
xor eax, eax
push edi
mov edi, edx
mov dword [ebp - 0x634], eax
mov ebx, eax
mov dword [ebp - 0x624], eax
call fcn.004066b9
xor eax, eax
cmp byte [esi + 0x36], al
mov dword [ebp - 0x620], eax
setne al
cmp byte [esi + 0x32], bl
je 0x403c36
or eax, 2
cmp byte [esi + 0x34], bl
jne 0x403c3e
or eax, 4
cmp dword [ebp + 0x14], ebx
je 0x403c46
or eax, 8
mov edx, dword [ebp - 0x62c]
mov ecx, edi
push eax
push dword [ebp - 0x630]
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x694]
push eax
call fcn.0040896d
push 0xb
pop ecx
mov esi, eax
lea edi, [ebp - 0x668]
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0x668], ebx
je 0x403c9d
push 0x5d
push 7
call fcn.004063f7
mov edx, dword [ebp - 0x668]
pop ecx
pop ecx
call fcn.00406fba
mov ebx, eax
test ebx, ebx
jne 0x40418f
mov edi, dword [ebp - 0x640]
xor edx, edx
inc edx
mov dword [ebp - 0x630], 0x401268
mov dword [ebp - 0x62c], edi
cmp edi, 0xffffffff
je 0x403f6a
cmp byte [0x41242c], 0
jne 0x403dd7
mov byte [0x41242c], dl
lea edx, [ebp - 0x61c]
call fcn.0040e212
test eax, eax
jne 0x403d1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x414]
push 0xa
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itow]
push 0x2a
push 7
call fcn.004063f7
lea eax, [ebp - 0x414]
push eax
push 0x73
push 7
call fcn.004063f7
add esp, 0x20
test ebx, ebx
jne 0x40418f
push 0x412430
xor esi, esi
lea eax, [ebp - 0x61c]
push esi
push 0x4012ac
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x403d77
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x414]
push 0xa
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itow]
push 0x2a
push 7
call fcn.004063f7
lea eax, [ebp - 0x414]
push eax
push 0x73
push 7
call fcn.004063f7
add esp, 0x20
test ebx, ebx
jne 0x40418f
push esi
push 0x8000080
push 2
push esi
push esi
push 0x40000000
push 0x412430
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x412428], eax
cmp eax, 0xffffffff
jne 0x403dd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x414]
push 0xa
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itow]
push 0x36
push 7
call fcn.004063f7
lea eax, [ebp - 0x414]
push eax
push 0x73
push 7
call fcn.004063f7
add esp, 0x20
test ebx, ebx
jne 0x40418f
mov esi, edi
mov dword [ebp - 0x628], edi
jmp 0x403ed7
mov edi, dword [eax + esi*4]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x634]
jne 0x403dec
mov al, byte [0x412664]
sub ecx, edx
sar ecx, 1
test al, al
je 0x403e0c
add ecx, ecx
jmp 0x403e59
lea esi, [ecx*2 + 2]
push esi
push 0x40
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
mov dword [ebp - 0x624], eax
test eax, eax
je 0x403ef9
push esi
mov edx, eax
mov ecx, edi
call fcn.0040de74
test eax, eax
je 0x403ef9
mov ecx, dword [ebp - 0x624]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403e45
mov al, byte [0x412664]
sub ecx, edx
mov esi, dword [ebp - 0x628]
test al, al
jne 0x403e63
mov edi, dword [ebp - 0x624]
xor eax, eax
push eax
push 0x40f3d8
push ecx
push edi
push dword [0x412428]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403eb9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x20c]
push 0xa
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itow]
push 0x55
push 7
call fcn.004063f7
lea eax, [ebp - 0x20c]
push eax
push 0x73
push 7
call fcn.004063f7
add esp, 0x20
test ebx, ebx
jne 0x40418f
mov ecx, dword [ebp - 0x624]
test ecx, ecx
je 0x403ed0
call fcn.0040e0b1
xor eax, eax
mov dword [ebp - 0x624], eax
inc esi
mov dword [ebp - 0x628], esi
mov eax, dword [ebp - 0x620]
xor ecx, ecx
cmp dword [eax + esi*4], ecx
jne 0x403de4
cmp byte [0x412664], cl
je 0x403f01
mov eax, 0x401268
push 4
jmp 0x403f08
push 8
pop ebx
jmp 0x40418f
mov eax, 0x4012b8
push 2
pop ecx
xor esi, esi
push esi
push 0x40f3d8
push ecx
push eax
push dword [0x412428]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403f5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x20c]
push 0xa
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itow]
push 0x55
push 7
call fcn.004063f7
lea eax, [ebp - 0x20c]
push eax
push 0x73
push 7
call fcn.004063f7
add esp, 0x20
test ebx, ebx
jne 0x40418f
mov eax, dword [ebp - 0x640]
xor edx, edx
inc edx
jmp 0x403f75
or eax, 0xffffffff
xor esi, esi
mov dword [ebp - 0x62c], eax
mov ecx, dword [ebp - 0x620]
test ecx, ecx
je 0x4041a5
mov edi, esi
cmp dword [ecx], esi
je 0x4040be
cmp edi, eax
jae 0x4040af
cmp eax, edx
je 0x4040af
mov esi, dword [ecx + edi*4]
mov ecx, esi
mov dword [ebp - 0x628], esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x634]
jne 0x403fab
mov al, byte [0x412664]
sub ecx, edx
sar ecx, 1
test al, al
je 0x403fcb
add ecx, ecx
jmp 0x404018
lea esi, [ecx*2 + 2]
push esi
push 0x40
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
mov dword [ebp - 0x624], eax
test eax, eax
je 0x403ef9
push esi
mov esi, dword [ebp - 0x628]
mov edx, eax
mov ecx, esi
call fcn.0040de74
test eax, eax
je 0x403ef9
mov ecx, dword [ebp - 0x624]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40400a
mov al, byte [0x412664]
sub ecx, edx
test al, al
jne 0x404022
mov esi, dword [ebp - 0x624]
xor eax, eax
push eax
push 0x40f3d8
push ecx
push esi
push dword [ebp - 0x638]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404078
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x20c]
push 0xa
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itow]
push 0x55
push 7
call fcn.004063f7
lea eax, [ebp - 0x20c]
push eax
push 0x73
push 7
call fcn.004063f7
add esp, 0x20
test ebx, ebx
jne 0x40418f
mov eax, dword [ebp - 0x624]
test eax, eax
je 0x404093
mov ecx, eax
call fcn.0040e0b1
xor esi, esi
mov dword [ebp - 0x624], esi
jmp 0x404095
xor esi, esi
mov ecx, dword [ebp - 0x620]
inc edi
cmp dword [ecx + edi*4], esi
je 0x4040af
mov eax, dword [ebp - 0x62c]
xor edx, edx
inc edx
jmp 0x403f8d
test edi, edi
je 0x4040be
cmp dword [ebp + 0x14], 0
jne 0x4040be
xor eax, eax
inc eax
jmp 0x4040c0
mov eax, esi
mov edx, dword [ebp - 0x63c]
mov dword [edx], eax
mov edx, dword [ecx]
test edx, edx
je 0x40410b
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x634]
jne 0x4040d3
sub ecx, esi
xor eax, eax
sar ecx, 1
mov word [edx + ecx*2 - 4], ax
mov eax, dword [ebp - 0x620]
mov eax, dword [eax]
add eax, 8
push eax
push 0x35
push 0xa
call fcn.004063f7
mov ecx, dword [ebp - 0x620]
add esp, 0xc
lea eax, [ebp - 0x694]
push eax
call fcn.00409fa6
xor edx, edx
mov ecx, edx
mov dword [ebp - 0x620], ecx
test edi, edi
je 0x404195
cmp byte [0x412664], cl
je 0x404131
push 4
jmp 0x40413d
mov dword [ebp - 0x630], 0x4012b8
push 2
pop eax
push edx
push 0x40f3d8
push eax
push dword [ebp - 0x630]
push dword [ebp - 0x638]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40418f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x20c]
push 0xa
push eax
push ebx
call dword [sym.imp.msvcrt.dll__itow]
push 0x55
push 7
call fcn.004063f7
lea eax, [ebp - 0x20c]
push eax
push 0x73
push 7
call fcn.004063f7
add esp, 0x20
mov ecx, dword [ebp - 0x620]
test ecx, ecx
je 0x4041a5
lea eax, [ebp - 0x694]
push eax
call fcn.00409fa6
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e870
leave
ret 0x14