Function at 0x40b646
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4295f9
call fcn.0041f054
mov eax, 0x18a0
call fcn.0041f080
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi], ebx
je 0x40b66f
mov eax, 0x8000ffff
jmp 0x40ba5f
or dword [ebp - 0x48], 0xffffffff
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], ebx
call fcn.0040c708
mov dword [ebp - 0x44], 0x42c4d4
mov ecx, 0x208
xor eax, eax
lea edi, [ebp - 0x8ab]
mov byte [ebp - 0x8ac], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x74]
mov dword [ebp - 4], 1
stosb byte es:[edi], al
call fcn.004031c8
push dword [esi + 0x14]
mov byte [ebp - 4], 2
push str.API:Downloader:Download__Status:_URL_S
push 2
push eax
call fcn.004033c7
add esp, 0x10
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.00408947
push ebx
lea edi, [esi + 8]
push str.http:__
push 7
push ebx
mov ecx, edi
call fcn.0040ca76
test eax, eax
je 0x40b70c
push ebx
push str.ftp:__
push 6
push ebx
mov ecx, edi
call fcn.0040ca76
test eax, eax
jne 0x40b72b
mov ecx, edi
call fcn.0040cb74
push dword [edi + 4]
lea eax, [ebp - 0x8ac]
push str.Referer:__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push ebx
push str.ftp:__
push 6
push ebx
mov ecx, edi
call fcn.0040ca76
neg eax
sbb al, al
push 0xc0
inc al
mov byte [ebp - 0xd], al
call fcn.0041f770
pop ecx
mov dword [ebp - 0x34], eax
cmp eax, ebx
mov byte [ebp - 4], 3
je 0x40b766
mov ecx, eax
call fcn.0040ba94
mov dword [ebp - 0x18], eax
jmp 0x40b769
mov dword [ebp - 0x18], ebx
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.0040cb74
mov edi, dword [edi + 4]
lea eax, [ebp - 0x8ac]
push 0x80400100
push eax
push edi
mov edi, dword [ebp - 0x18]
mov ecx, edi
call fcn.0040bedf
test al, al
jne 0x40b7f3
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jg 0x40b7a4
call edi
mov edi, eax
jmp 0x40b7b4
call edi
mov edi, eax
and edi, 0xffff
or edi, 0x80070000
mov esi, dword [esi + 4]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], edi
push ecx
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
lea ecx, [ebp - 0x74]
call fcn.004031c8
push edi
push str.API:Downloader:Download__Status:_Download_Error__hResult0x_lx
push 8
push eax
mov byte [ebp - 4], 4
call fcn.004033c7
add esp, 0x10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x6c]
call fcn.00408947
jmp 0x40b8f5
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x18]
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x1c], eax
mov edi, eax
call fcn.004031c8
push edi
push str.API:Downloader:Download__Status:_Start_Download__size_d
push 2
push eax
mov byte [ebp - 4], 5
call fcn.004033c7
add esp, 0x10
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.00408947
mov ecx, dword [esi + 4]
lea edx, [ebp - 0x30]
push edx
mov eax, dword [ecx]
call dword [eax]
cmp byte [ebp - 0xd], bl
jne 0x40b880
cmp edi, ebx
jbe 0x40b841
cmp edi, 0xffffffff
jne 0x40b880
mov esi, dword [esi + 4]
mov edi, 0x8004d554
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], edi
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 8]
lea ecx, [ebp - 0x74]
call fcn.004031c8
push edi
push str.API:Downloader:Download__Status:_Download_Error__hResult0x_lx
push 8
push eax
mov byte [ebp - 4], 6
call fcn.004033c7
add esp, 0x10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x6c]
jmp 0x40b7e9
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x58]
push dword [eax]
call fcn.0040ba70
sub esp, 0x10
lea eax, [ebp - 0x58]
mov edi, esp
mov dword [ebp + 8], esp
push eax
mov ecx, edi
mov byte [ebp - 4], 7
call fcn.0040c743
lea ecx, [ebp - 0x48]
mov dword [edi], 0x42c4d4
call fcn.0040c0d5
cmp eax, ebx
jne 0x40b908
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jg 0x40b8c8
call edi
mov edi, eax
jmp 0x40b8d8
call edi
mov edi, eax
and edi, 0xffff
or edi, 0x80070000
mov esi, dword [esi + 4]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], edi
push ecx
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
call fcn.0040c779
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.0040c1b7
mov eax, edi
jmp 0x40ba5f
lea eax, [ebp - 0x58]
lea ecx, [ebp - 0x88]
push eax
call fcn.0040c17d
mov byte [ebp - 4], 8
mov byte [ebp - 0xe], bl
mov byte [ebp + 0xb], bl
mov byte [ebp - 0xd], bl
cmp byte [ebp + 0xb], bl
jne 0x40b9f7
cmp byte [ebp - 0xd], bl
jne 0x40b9f7
mov edi, 0x1000
lea eax, [ebp - 0x18ac]
push edi
push ebx
push eax
call fcn.0041f910
mov ecx, dword [ebp - 0x18]
add esp, 0xc
lea eax, [ebp - 0x18ac]
push edi
push eax
call fcn.0040bfd3
mov edi, eax
cmp edi, 0xffffffff
sete byte [ebp + 0xb]
cmp byte [ebp + 0xb], bl
jne 0x40b9b9
cmp edi, ebx
jbe 0x40b996
lea eax, [ebp - 0x34]
push ebx
push eax
lea eax, [ebp - 0x18ac]
push edi
push eax
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b98d
mov eax, dword [ebp - 0x34]
jmp 0x40b990
or eax, 0xffffffff
cmp eax, ebx
sete byte [ebp + 0xb]
cmp byte [ebp + 0xb], bl
jne 0x40b9b9
mov ecx, dword [esi + 4]
add dword [ebp - 0x20], edi
lea edx, [ebp - 0x30]
mov eax, dword [ecx]
push edx
call dword [eax + 4]
cmp eax, 1
setne byte [ebp - 0xe]
cmp edi, ebx
sete byte [ebp - 0xd]
jmp 0x40b9ee
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jg 0x40b9c9
call edi
jmp 0x40b9d5
call edi
and eax, 0xffff
or eax, 0x80070000
mov ecx, dword [esi + 4]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x30], eax
lea edx, [ebp - 0x30]
mov eax, dword [ecx]
push edx
call dword [eax + 8]
cmp eax, 1
setne byte [ebp + 0xb]
cmp byte [ebp - 0xe], bl
je 0x40b924
cmp dword [ebp - 0x48], 0xffffffff
je 0x40ba0a
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x48], 0xffffffff
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xe], bl
jne 0x40ba27
cmp byte [ebp + 0xb], bl
jne 0x40ba27
lea ecx, [ebp - 0x88]
call fcn.0040c199
mov esi, dword [esi + 4]
lea ecx, [ebp - 0x30]
push ecx
mov ecx, esi
mov eax, dword [esi]
call dword [eax + 0xc]
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 7
call fcn.0040c19e
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
call fcn.0040c779
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.0040c1b7
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4