Function at 0x418070
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x21c
push ebx
mov ebx, ecx
push esi
lea eax, [esp + 8]
mov ecx, dword [ebx + 0x7f8]
push 6
push eax
call fcn.0040bbc0
mov eax, dword [ebx + 0x844]
xor ecx, ecx
mov cl, byte [esp + 0xb]
xor edx, edx
mov dl, byte [esp + 0xd]
mov ch, byte [esp + 0xa]
mov dh, byte [esp + 0xc]
mov word [esp + 0xa], cx
test eax, eax
mov word [esp + 0xc], dx
je 0x41816b
mov eax, dword [esp + 0xc]
lea ecx, [ebx + 0x3fc]
and eax, 0xffff
push edi
lea edx, [ebx + 0xff]
mov dword [ebx + 0x804], eax
push ecx
push edx
lea eax, [esp + 0x2c]
push str._s_s
push eax
call fcn.00430f4e
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebx + 0x6f9]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x8000000
and ecx, 3
push 2
rep movsb byte es:[edi], byte [esi]
push 0
push 3
lea ecx, [esp + 0x38]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebx + 0x848], eax
mov eax, dword [ebx + 0x804]
inc eax
xor edx, edx
push 1
lea ecx, [eax + eax*4]
mov eax, dword [ebx + 0x808]
shl ecx, 1
div ecx
mov ecx, ebx
push eax
push 0
push 0
call fcn.00419a20
mov dword [ebx + 0x844], 0
mov dword [ebx + 0x834], 1
pop edi
cmp word [esp + 0xa], 0
jne 0x418253
cmp word [esp + 0xc], 0
jne 0x418253
mov ecx, dword [ebx + 0x7f8]
lea edx, [esp + 0x10]
push 4
push edx
call fcn.0040bbc0
cmp dword [ebx + 0x848], 0xffffffff
je 0x4182b6
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push edx
mov ecx, ebx
call fcn.00419f60
lea eax, [esp + 0x14]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [ebx + 0x848]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov ecx, dword [ebx + 0x820]
push 0
push 0
push 0x402
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebx + 0x824]
push 0x44a200
push edx
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [ebx + 0x848]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebx + 0xff]
push ecx
mov ecx, ebx
call fcn.004183d0
mov edx, dword [ebx + 0x80c]
push 0
push 0x441
push edx
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
push 1
mov ecx, ebx
call fcn.004191b0
mov dword [ebx + 0x844], 1
mov dword [ebx + 0x834], 0
pop esi
pop ebx
add esp, 0x21c
ret
mov eax, dword [esp + 0xc]
and eax, 0xffff
push eax
call fcn.00430b6b
mov ecx, dword [esp + 0x10]
add esp, 4
and ecx, 0xffff
mov esi, eax
push ecx
mov ecx, dword [ebx + 0x7f8]
push esi
call fcn.0040bbc0
mov edx, dword [ebx + 0x80c]
mov ecx, ebx
push edx
call fcn.00419150
mov eax, dword [ebx + 0x838]
test eax, eax
jne 0x4182ab
push str.Download_cancelled_by_user
mov ecx, ebx
call fcn.00418360
pop esi
pop ebx
add esp, 0x21c
ret
mov eax, dword [ebx + 0x848]
cmp eax, 0xffffffff
jne 0x4182e4
push str.Could_not_create_file
mov ecx, ebx
call fcn.00418360
mov eax, dword [ebx + 0x80c]
push 0x30
push str.Download_Failed
push str.Download_failed:_could_not_create_local_file
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
pop ebx
add esp, 0x21c
ret
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x1c]
push 0
and edx, 0xffff
push ecx
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebx + 0x800]
add ecx, eax
mov eax, dword [ebx + 0x804]
mov dword [ebx + 0x800], ecx
lea edx, [eax + eax*4]
shl edx, 1
cmp ecx, edx
jb 0x41833f
mov eax, dword [ebx + 0x820]
push 0
push 0
push 0x405
push eax
mov dword [ebx + 0x800], 0
call dword [sym.imp.USER32.dll_SendMessageA]
push esi
call fcn.00430a30
add esp, 4
pop esi
pop ebx
add esp, 0x21c
ret