Function at 0x40242d
Capabilities:
Receive http response
Write file on windows

Disassembly:
push 0x94
push 0x44cd38
call fcn.00438f70
mov ebx, ecx
mov dword [ebp - 0x34], ebx
mov edi, dword [ebp + 0x10]
xor ecx, ecx
cmp dword [ebx + 0x1c], ecx
jle 0x4029f1
mov eax, dword [ebp + 8]
cmp eax, dword [ebx + 0x28]
jne 0x4029f1
mov eax, dword [ebp + 0xc]
mov edx, 0x80
cmp eax, edx
ja 0x402525
je 0x402519
sub eax, 1
je 0x4024f0
sub eax, 1
je 0x4024d3
dec eax
sub eax, 1
je 0x4024c7
push 4
pop ecx
sub eax, ecx
je 0x4024bb
sub eax, 8
je 0x4024af
sub eax, 0x10
je 0x4024a7
sub eax, 0x20
jne 0x4029f1
mov dword [ebx + 0x1c], 0xc
jmp 0x4029f1
mov dword [ebx + 0x1c], ecx
jmp 0x4029f1
mov dword [ebx + 0x1c], 3
jmp 0x4029f1
mov dword [ebx + 0x1c], 9
jmp 0x4029f1
mov dword [ebx + 0x1c], 8
jmp 0x4029f1
mov dword [ebx + 0x1c], 7
lea esi, [ebx + 0x206c]
mov ecx, esi
call fcn.0040154b
or dword [ebp - 0x6c], 0xffffffff
lea edx, [ebp - 0x6c]
jmp 0x40250b
mov dword [ebx + 0x1c], 6
lea esi, [ebx + 0x2068]
mov ecx, esi
call fcn.0040154b
or dword [ebp - 0x3c], 0xffffffff
lea edx, [ebp - 0x3c]
mov ecx, edi
call fcn.0040161b
mov dword [esi], eax
jmp 0x4029f1
mov dword [ebx + 0x1c], 0xd
jmp 0x4029f1
cmp eax, 0x100
je 0x4029ea
cmp eax, 0x200
je 0x4029e1
cmp eax, 0x20000
je 0x4027eb
cmp eax, 0x40000
je 0x4026ef
cmp eax, 0x80000
je 0x40258e
cmp eax, 0x200000
je 0x402580
cmp eax, 0x400000
jne 0x4029f1
mov dword [ebx + 0x1c], 5
push ecx
push dword [ebx + 0x28]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
jmp 0x4029f1
push ecx
push edi
mov ecx, ebx
call fcn.004023c6
jmp 0x4029f1
mov dword [ebx + 0x1c], 0x10
mov esi, dword [ebp + 0x14]
sub dword [ebx + 0x205c], esi
add dword [ebx + 0x2060], esi
adc dword [ebx + 0x2064], ecx
cmp dword [ebx + 0x38], ecx
jne 0x4025d0
call fcn.00401783
mov dword [ebx + 0x38], eax
test eax, eax
jne 0x4025ce
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.FILE_API_COULD_NOT_CREATE_FILE
jmp 0x402748
xor ecx, ecx
lea edi, [ebx + 0x59]
mov eax, dword [ebx + 0x38]
mov dword [ebp - 0x3c], eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x3c]
call fcn.00401803
test al, al
je 0x4026dd
test edi, edi
je 0x4026dd
and dword [ebp - 0x40], 0
push 0
lea eax, [ebp - 0x40]
push eax
push esi
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4026dd
cmp dword [ebp - 0x40], esi
jne 0x4026dd
mov edi, dword [ebx + 0x20b0]
test edi, edi
je 0x4026b0
and dword [ebp - 0x24], 0
and dword [ebp - 0x20], 0
mov esi, dword [ebx + 0x40]
mov edx, dword [ebx + 0x44]
mov ecx, dword [ebx + 0x50]
add ecx, esi
mov eax, dword [ebx + 0x54]
adc eax, edx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], eax
add esi, dword [ebx + 0x2060]
adc edx, dword [ebx + 0x2064]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], edx
and dword [ebp - 0x78], 0
and dword [ebp - 0x74], 0
mov eax, dword [ebx + 4]
mov dword [ebp - 0x7c], eax
mov byte [ebp - 0x78], 1
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x74], eax
mov byte [ebp - 0x2e], 0
mov dword [ebp - 4], 4
lea eax, [ebp - 0x7c]
push eax
push dword [ebx + 0x20b4]
call edi
mov dword [ebp - 4], 0xfffffffe
mov al, byte [ebp - 0x2e]
jmp 0x4026a8
test al, al
jne 0x4029f1
mov eax, dword [ebx + 0x205c]
push 0
test eax, eax
je 0x4029a9
mov edx, 0x2000
cmp eax, edx
cmova eax, edx
push eax
lea eax, [ebx + 0x59]
push eax
push dword [ebx + 0x28]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
jmp 0x4029f1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.FILE_API_COULD_NOT_WRITE_FILE
jmp 0x402748
mov dword [ebx + 0x1c], 0xf
mov eax, dword [edi]
test eax, eax
je 0x402702
add dword [ebx + 0x205c], eax
mov eax, dword [ebx + 0x205c]
test eax, eax
je 0x40270f
push ecx
jmp 0x4026c0
mov dword [ebx + 0x1c], 0x11
mov ecx, dword [ebx + 0x38]
call fcn.00401803
test al, al
je 0x402729
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [ebx + 0x38]
call fcn.004018b7
mov edx, eax
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x402754
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.FILE_API_COULD_NOT_MAP_FILE
mov ecx, ebx
call fcn.004022c5
jmp 0x4029f1
mov dword [ebp - 4], 2
mov esi, dword [ebx + 0x20b0]
test esi, esi
je 0x4027cc
xor ecx, ecx
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x80], ecx
mov eax, dword [edx]
mov dword [ebp - 0x8c], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x84], eax
mov eax, dword [edx + 8]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], ecx
mov byte [ebp - 0x58], 2
mov eax, dword [ebx + 4]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x54], eax
mov dword [ebp - 4], 3
lea eax, [ebp - 0x5c]
push eax
push dword [ebx + 0x20b4]
call esi
jmp 0x4027c5
mov dword [ebp - 4], 2
mov dword [ebp - 4], 0xfffffffe
call fcn.004027dd
jmp 0x4029f1
mov dword [ebx + 0x1c], 0xe
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 4], ecx
push ecx
push 0x13
pop edx
mov ecx, dword [ebx + 0x28]
call fcn.00401ae8
mov edi, eax
mov dword [ebp - 0x38], edi
push 0
push 5
pop edx
mov ecx, dword [ebx + 0x28]
call fcn.00401ae8
pop ecx
pop ecx
mov esi, eax
mov dword [ebp - 0x48], esi
lea ecx, [ebx + 0x50]
xor eax, eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
lea edx, [ebx + 0x2c]
mov dword [edx], eax
test edi, edi
je 0x40284c
push edx
push 0x80000000
push eax
push edi
call dword [sym.imp.OLEAUT32.dll_VarI4FromDisp]
xor eax, eax
lea ecx, [ebx + 0x50]
test esi, esi
je 0x40285e
push ecx
push 0x80000000
push eax
push esi
call dword [sym.imp.OLEAUT32.dll_VarUI8FromDisp]
xor esi, esi
inc esi
cmp dword [ebx + 0x30], esi
ja 0x40295c
push 0
push 0x2a
pop edx
mov ecx, dword [ebx + 0x28]
call fcn.00401ae8
pop ecx
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x402895
push eax
push str.bytes
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
xor ecx, ecx
test eax, eax
sete cl
mov byte [ebx + 0x58], cl
cmp dword [ebx + 0x30], esi
ja 0x40295c
cmp dword [ebx + 0x20b0], 0
je 0x40295c
and dword [ebp - 0x44], 0
lea eax, [ebp - 0x44]
push eax
push 0x16
pop edx
mov ecx, dword [ebx + 0x28]
call fcn.00401ae8
pop ecx
mov edx, eax
mov dword [ebp - 0x50], edx
test edx, edx
je 0x40295c
xor ecx, ecx
mov dword [ebp - 0xa4], ecx
xor eax, eax
lea edi, [ebp - 0xa0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0xa4], edx
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebx + 0x2c]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebx + 0x50]
mov dword [ebp - 0x94], eax
mov eax, dword [ebx + 0x54]
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x60], ecx
mov eax, dword [ebx + 4]
mov dword [ebp - 0x68], eax
mov byte [ebp - 0x64], cl
lea eax, [ebp - 0xa4]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x2d], cl
mov dword [ebp - 4], esi
lea eax, [ebp - 0x68]
push eax
push dword [ebx + 0x20b4]
call dword [ebx + 0x20b0]
and dword [ebp - 4], 0
mov al, byte [ebp - 0x2d]
jmp 0x402958
test al, al
jne 0x40299b
cmp dword [ebp - 0x38], 0
jne 0x40298c
push 0
push str.Got_invalid_header
push 0
push str.WINTHTTP_API_QUERY_HEADERS
mov ecx, ebx
call fcn.004022c5
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x45100c
call fcn.00422620
add esp, 0xc
jmp 0x4029f1
mov eax, dword [ebx + 0x2c]
cdq
push 0x64
pop ecx
idiv ecx
dec eax
cmp eax, 2
ja 0x4029b4
mov dword [ebp - 4], 0xfffffffe
call fcn.004029c0
push 0
push dword [ebx + 0x28]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
jmp 0x4029f1
push 0
push str.Resource_unavailable
jmp 0x402969
mov dword [ebx + 0x1c], 0xb
jmp 0x4029f1
mov dword [ebx + 0x1c], 0xa
call fcn.00438fb9
ret 0x10