Function at 0x415e20
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x21c
push esi
push edi
mov esi, ecx
mov ecx, dword [esi + 0x7f8]
push 6
lea eax, [esp + 0xc]
push eax
call fcn.00404470
movzx cx, byte [esp + 0xb]
mov ch, byte [esp + 0xa]
movzx ax, byte [esp + 0xd]
mov ah, byte [esp + 0xc]
mov word [esp + 0xa], cx
mov ecx, dword [esi + 0x84c]
test ecx, ecx
mov word [esp + 0xc], ax
je 0x415f0a
movzx edx, ax
lea eax, [esi + 0x3fc]
push eax
lea ecx, [esi + 0xff]
push ecx
mov dword [esi + 0x804], edx
lea edx, [esp + 0x28]
push str._s_s
push edx
call fcn.0042da36
lea eax, [esp + 0x30]
lea edx, [esi + 0x6f9]
mov ecx, eax
add esp, 0x10
sub edx, ecx
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x415ea0
push 0
push 0x8000000
push 2
push 0
push 3
push 0x40000000
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x850], eax
mov eax, dword [esi + 0x804]
inc eax
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x808]
shl ecx, 1
xor edx, edx
div ecx
push 1
mov ecx, esi
push eax
push 0
push 0
call fcn.00414370
mov ax, word [esp + 0xc]
mov dword [esi + 0x84c], 0
mov dword [esi + 0x83c], 1
cmp word [esp + 0xa], 0
jne 0x416030
test ax, ax
jne 0x416030
mov ecx, dword [esi + 0x7f8]
push 4
lea edx, [esp + 0x1c]
push edx
call fcn.00404470
mov edi, dword [esi + 0x850]
cmp edi, 0xffffffff
jne 0x415f7d
push str.Could_not_create_file
mov ecx, esi
call fcn.004149a0
mov eax, dword [str.TTVNC]
mov ecx, dword [esi + 0x814]
push 0x30
push eax
push str.Download_failed:_could_not_create_local_file
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [esi + 0x828]
push 0
push 0
push 0x402
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x41600e
mov eax, dword [esp + 0x18]
cdq
push 0
add eax, 0xb6109100
push 0x989680
adc edx, 2
push edx
push eax
call fcn.0042df70
mov ecx, edx
mov dword [esp + 0x14], edx
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], eax
mov eax, edx
sar ecx, 0x1f
push eax
mov ecx, edx
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov edx, dword [esi + 0x828]
push 0
push 0
push 0x402
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esi + 0x82c]
push 0x43ab10
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [esi + 0x850]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esi + 0xff]
push edx
mov ecx, esi
call fcn.00414a10
mov dword [esi + 0x84c], 1
mov dword [esi + 0x83c], 0
mov eax, dword [esi + 0x814]
push 0
push 0x460
push 0x111
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
pop esi
add esp, 0x21c
ret
movzx ecx, ax
push ecx
call fcn.0042d009
movzx edx, word [esp + 0x10]
mov ecx, dword [esi + 0x7f8]
add esp, 4
mov edi, eax
push edx
push edi
call fcn.00404470
mov eax, dword [esi + 0x814]
push eax
mov ecx, esi
call fcn.00414140
mov eax, dword [esi + 0x840]
test eax, eax
jne 0x416086
push str.Download_cancelled_by_user
mov ecx, esi
call fcn.004149a0
push edi
call fcn.0042da31
add esp, 4
pop edi
pop esi
add esp, 0x21c
ret
mov eax, dword [esi + 0x850]
cmp eax, 0xffffffff
jne 0x4160ca
push str.Could_not_create_file
mov ecx, esi
call fcn.004149a0
mov ecx, dword [str.TTVNC]
mov edx, dword [esi + 0x814]
push 0x30
push ecx
push str.Download_failed:_could_not_create_local_file
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call fcn.0042da31
add esp, 4
pop edi
pop esi
add esp, 0x21c
ret
movzx edx, word [esp + 0xc]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x800]
add ecx, eax
mov eax, dword [esi + 0x804]
lea edx, [eax + eax*4]
shl edx, 1
cmp ecx, edx
mov dword [esi + 0x800], ecx
jb 0x416120
mov eax, dword [esi + 0x828]
push 0
push 0
push 0x405
push eax
mov dword [esi + 0x800], 0
call dword [sym.imp.USER32.dll_SendMessageA]
push edi
call fcn.0042da31
add esp, 4
pop edi
pop esi
add esp, 0x21c
ret