Function at 0x4085e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
mov eax, dword [0x438170]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov eax, dword [eax]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
mov ebx, ecx
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x220], esi
cmp eax, 0xf0
jne 0x4086a4
mov eax, dword [edi]
mov ecx, dword [eax + 4]
cmp ecx, 4
je 0x408e07
cmp ecx, 0x21
jne 0x408e20
mov ecx, dword [eax + 0xc]
inc ecx
mov edx, ecx
lea eax, [ecx + 4]
imul edx, edx, 0xa8
imul eax, eax, 0xa8
add eax, ebx
push eax
lea eax, [ebx + 0x23c]
add eax, edx
push eax
lea eax, [ebx + 0x27c]
add eax, edx
push eax
push str._n___Bridge_broken_to___S__S__S____n
push ebx
mov dword [ebx + 0x2dc], ecx
call fcn.00401a80
mov eax, dword [edi]
add esp, 0x14
test eax, eax
je 0x40867e
push eax
call fcn.00414cc3
add esp, 4
mov dword [edi], 0
mov ecx, ebx
mov dword [esi], 0
call fcn.004081c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 0xc
cmp eax, 0x84
jne 0x408d26
mov esi, dword [edi]
mov eax, dword [esi + 4]
cmp eax, 4
je 0x408a93
cmp eax, 0x28
jne 0x408e20
lea eax, [ebx + 0xaae8]
push eax
mov dword [ebp - 0x228], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
cmp dword [ebx + 0xab04], edi
jbe 0x408749
lea eax, [ebx + 0xaae4]
lea edx, [esi + 0x220]
nop
xor ecx, ecx
cmp edi, dword [eax + 0x20]
jae 0x4086fd
mov eax, dword [eax + 0x1c]
mov ecx, dword [eax + edi*4]
push edx
push ecx
call fcn.00426658
add esp, 8
test eax, eax
je 0x408722
inc edi
lea eax, [ebx + 0xaae4]
lea edx, [esi + 0x220]
cmp edi, dword [ebx + 0xab04]
jb 0x4086f0
jmp 0x408749
xor ecx, ecx
mov dword [ebp - 0x218], ecx
cmp edi, dword [ebx + 0xab04]
jae 0x408741
mov eax, dword [ebx + 0xab00]
mov ecx, dword [eax + edi*4]
mov dword [ebp - 0x218], ecx
test ecx, ecx
jne 0x40883b
push dword [esi + 0x444]
lea eax, [esi + 0x220]
push dword [esi + 0x440]
lea ecx, [esi + 0x18]
push eax
push ecx
push str._n____s___s___I64u____n
push ebx
call fcn.00401a80
xor edi, edi
push 0x430
mov dword [ebp - 0x218], edi
call fcn.00414cfb
add esp, 0x1c
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x4087a5
push 0x430
push edi
push eax
call fcn.0041e930
mov edi, dword [ebp - 0x21c]
add esp, 0xc
mov dword [ebp - 0x218], edi
push 0x104
lea eax, [esi + 0x220]
push eax
push edi
call fcn.00414d8d
xor eax, eax
mov word [edi + 0x206], ax
push 0x104
lea eax, [esi + 0x18]
push eax
lea eax, [edi + 0x208]
push eax
call fcn.00414d8d
xor eax, eax
mov word [edi + 0x40e], ax
mov eax, dword [esi + 0x440]
mov dword [edi + 0x418], eax
mov eax, dword [esi + 0x444]
mov dword [edi + 0x41c], eax
mov dword [edi + 0x420], 0
mov dword [edi + 0x424], 0
mov eax, dword [esi + 0x10]
mov dword [edi + 0x410], eax
lea edi, [ebx + 0xaae4]
add esp, 0x18
mov ecx, edi
call fcn.00409c10
test al, al
je 0x408841
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x1c]
mov edx, dword [ebp - 0x218]
mov dword [eax + ecx*4], edx
inc dword [edi + 0x20]
jmp 0x408841
lea edi, [ebx + 0xaae4]
push 1
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push 0
push 0x80
lea eax, [ebp - 0x250]
push 4
mov dword [ebp - 0x238], eax
lea eax, [ebp - 0x23c]
push eax
push 1
push 0x40000000
push dword [ebp - 0x218]
mov dword [ebp - 0x23c], 0xc
mov dword [ebp - 0x234], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x21c], eax
cmp eax, 0xffffffff
je 0x40898c
push 0
push 0
push dword [esi + 0x44c]
push dword [esi + 0x448]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x230]
push eax
push dword [esi + 0x450]
lea eax, [esi + 0x458]
push eax
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x218]
mov edx, dword [esi + 0x450]
mov eax, edx
add eax, dword [ecx + 0x420]
mov dword [ebp - 0x22c], eax
mov eax, dword [esi + 0x454]
adc eax, dword [ecx + 0x424]
cmp eax, dword [ecx + 0x41c]
jb 0x40896c
ja 0x408938
mov eax, dword [ebp - 0x22c]
cmp eax, dword [ecx + 0x418]
jb 0x40896c
push dword [esi + 0x444]
lea eax, [esi + 0x220]
push dword [esi + 0x440]
push eax
lea eax, [esi + 0x18]
push eax
push str._n___Download_end:__s___s___I64u____n
push ebx
call fcn.00401a80
add esp, 0x18
mov ecx, edi
push dword [ebp - 0x218]
call fcn.00409b10
jmp 0x4089ae
add edx, dword [esi + 0x448]
mov eax, dword [esi + 0x454]
adc eax, dword [esi + 0x44c]
mov dword [ecx + 0x420], edx
mov dword [ecx + 0x424], eax
jmp 0x4089ae
mov eax, dword [esi + 0x448]
or eax, dword [esi + 0x44c]
jne 0x4089ae
push dword [ebp - 0x218]
push str._n____s_write_error______n
push ebx
call fcn.00401a80
add esp, 0xc
mov eax, dword [ebx + 0x2dc]
imul eax, eax, 0xa8
add eax, 0x23c
add eax, ebx
push eax
lea eax, [ebp - 0x214]
push str._S.filetask
push eax
call fcn.00401000
mov esi, dword [ebx + 0xab04]
imul esi, esi, 0x430
add esp, 0xc
test esi, esi
je 0x408a82
push esi
call fcn.00414cfb
add esp, 4
mov dword [ebp - 0x218], eax
test eax, eax
je 0x408a82
push esi
push 0
push eax
call fcn.0041e930
xor edx, edx
add esp, 0xc
cmp dword [ebx + 0xab04], edx
jbe 0x408a59
mov eax, dword [ebp - 0x218]
mov dword [ebp - 0x21c], eax
xor esi, esi
cmp edx, dword [edi + 0x20]
jae 0x408a36
mov eax, dword [edi + 0x1c]
mov esi, dword [eax + edx*4]
mov eax, dword [ebp - 0x21c]
mov edi, eax
mov ecx, 0x10c
rep movsd dword es:[edi], dword [esi]
inc edx
add eax, 0x430
mov dword [ebp - 0x21c], eax
lea edi, [ebx + 0xaae4]
cmp edx, dword [ebx + 0xab04]
jb 0x408a23
mov eax, dword [ebx + 0xab04]
mov ebx, dword [ebp - 0x218]
imul eax, eax, 0x430
push eax
mov edx, ebx
lea ecx, [ebp - 0x214]
call fcn.0040a1a0
push ebx
call fcn.00414cc3
add esp, 8
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x408cec
mov eax, dword [esi + 0x1c]
cmp eax, 0x28
je 0x408c1d
cmp eax, 0x30
jne 0x408e20
lea eax, [ebx + 0xeb44]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
cmp dword [ebx + 0xeb60], edi
jbe 0x408afd
lea edx, [ebx + 0xeb40]
xor ecx, ecx
cmp edi, dword [edx + 0x20]
jae 0x408ad2
mov eax, dword [edx + 0x1c]
mov ecx, dword [eax + edi*4]
mov eax, dword [ecx + 8]
cmp dword [eax + 4], 0x30
jne 0x408af4
mov eax, dword [eax + 0x10]
cmp eax, dword [esi + 0x468]
jne 0x408af4
push ecx
mov ecx, edx
call fcn.00409b10
lea edx, [ebx + 0xeb40]
inc edi
cmp edi, dword [ebx + 0xeb60]
jb 0x408ac5
lea eax, [ebx + 0xeb44]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebx + 0xab10]
push eax
mov dword [ebp - 0x228], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0xab2c]
xor ecx, ecx
test edi, edi
je 0x408bd7
cmp ecx, edi
jae 0x408b4c
mov eax, dword [ebx + 0xab28]
mov edx, dword [eax + ecx*4]
test edx, edx
je 0x408b4c
mov eax, dword [edx + 0x410]
cmp eax, dword [esi + 0x468]
je 0x408b56
inc ecx
cmp ecx, edi
jb 0x408b31
jmp 0x408bd7
cmp dword [edx + 0x428], 1
jne 0x408b88
mov esi, dword [ebp - 0x224]
mov eax, dword [esi]
test eax, eax
je 0x408b74
push eax
call fcn.00414cc3
add esp, 4
mov edi, dword [ebp - 0x220]
mov dword [esi], 0
mov dword [edi], 0
jmp 0x408be3
mov dword [edx + 0x428], 1
cmp dword [esi + 0x18], 0
je 0x408baf
lea eax, [esi + 0x470]
push eax
push str._n___Upload___s__Finished____n
push ebx
call fcn.00401a80
add esp, 0xc
jmp 0x408bd7
lea eax, [esi + 0x24]
test eax, eax
jne 0x408bbe
mov ecx, dword [esi + 0x20]
call fcn.0040a070
push eax
push dword [esi + 0x20]
lea eax, [esi + 0x470]
push eax
push str._n___Upload___s__Error:___d___s____n
push ebx
call fcn.00401a80
add esp, 0x14
mov edi, dword [ebp - 0x220]
mov esi, dword [ebp - 0x224]
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi]
test eax, eax
je 0x408bfe
push eax
call fcn.00414cc3
add esp, 4
mov dword [esi], 0
mov dword [edi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov dword [ebp - 0x218], eax
lea eax, [ebx + 0xaae8]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
cmp dword [ebx + 0xab04], edi
jbe 0x408c95
lea ecx, [esi + 0x220]
xor eax, eax
cmp edi, dword [ebx + 0xab04]
jae 0x408c55
mov eax, dword [ebx + 0xab00]
mov eax, dword [eax + edi*4]
push ecx
push eax
call fcn.00426658
add esp, 8
test eax, eax
je 0x408c74
inc edi
lea ecx, [esi + 0x220]
cmp edi, dword [ebx + 0xab04]
jb 0x408c42
jmp 0x408c95
mov dword [ebp - 0x218], 0
cmp edi, dword [ebx + 0xab04]
jae 0x408c95
mov eax, dword [ebx + 0xab00]
mov eax, dword [eax + edi*4]
mov dword [ebp - 0x218], eax
cmp dword [esi + 0x20], 0
je 0x408cb1
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x408cb1
lea ecx, [ebx + 0xaae4]
push eax
call fcn.00409b10
lea eax, [ebx + 0xaae8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esi + 0x18], 0
jne 0x408cec
lea eax, [esi + 0x24]
test eax, eax
jne 0x408cd3
mov ecx, dword [esi + 0x20]
call fcn.0040a070
push eax
push dword [esi + 0x20]
lea eax, [esi + 0x470]
push eax
push str._n___Download___s__Error:___d___s____n
push ebx
call fcn.00401a80
add esp, 0x14
mov esi, dword [ebp - 0x224]
mov eax, dword [esi]
test eax, eax
je 0x408d01
push eax
call fcn.00414cc3
add esp, 4
mov edi, dword [ebp - 0x220]
mov dword [esi], 0
mov dword [edi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 0xc
cmp eax, 0x82
jne 0x408d3b
push dword [esi]
push dword [edi]
call fcn.0040e420
jmp 0x408e05
cmp eax, 0x87
jne 0x408e20
cmp dword [0x439088], 0
je 0x408e20
mov ecx, dword [edi]
mov eax, dword [ecx + 4]
test eax, eax
je 0x408de0
cmp eax, 4
jne 0x408e20
lea ebx, [ecx + 0x18]
add ebx, dword [ecx + 8]
lea esi, [ecx + 0x18]
cmp esi, ebx
jae 0x408dac
mov ecx, dword [esi]
lea eax, [ecx + 8]
add eax, esi
cmp eax, ebx
ja 0x408dac
push 0
lea eax, [ebp - 0x230]
push eax
push ecx
lea eax, [esi + 8]
push eax
push dword [0x439034]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi]
add eax, 3
and eax, 0xfffffffc
add esi, 8
add esi, eax
cmp esi, ebx
jb 0x408d76
mov eax, dword [edi]
test eax, eax
je 0x408dbb
push eax
call fcn.00414cc3
add esp, 4
mov dword [edi], 0
mov edi, dword [ebp - 0x220]
mov dword [edi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ecx + 0xc], 2
jne 0x408e20
cmp dword [ecx + 0x14], 0
je 0x408df1
add ecx, 0x18
jmp 0x408df6
mov ecx, 0x432640
push ecx
push str._n___VPN_error__s_____n
push ebx
call fcn.00401a80
add esp, 0xc
mov eax, dword [edi]
test eax, eax
je 0x408e14
push eax
call fcn.00414cc3
add esp, 4
mov dword [edi], 0
mov dword [esi], 0
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004144c7
mov esp, ebp
pop ebp
ret 0xc