Function at 0x40ed80
Capabilities:
Receive http response
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x464e58
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47a060]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x40]
xor ebx, ebx
mov dword [esp + 0x38], 1
cmp dword [ebp + 8], ebx
jne 0x40edfd
mov esi, 8
cmp dword [esp + 0x5c], esi
jb 0x40edd2
mov eax, dword [esp + 0x48]
push eax
call fcn.0044ec2b
add esp, 4
cmp dword [esp + 0x78], esi
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], bx
jb 0x40edf6
mov ecx, dword [esp + 0x64]
push ecx
call fcn.0044ec2b
add esp, 4
xor eax, eax
jmp 0x40f0f1
push ebx
sub esp, 0x1c
mov esi, esp
mov dword [esp + 0x3c], esp
mov dword [esp + 0x34], ebx
mov dword [esp + 0x44], ebx
push ebx
xor edi, edi
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], ebx
push 0x469acc
mov dword [esp + 0x50], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x40], edi
mov word [esi + 4], bx
call fcn.00401070
sub esp, 0x1c
mov byte [esp + 0x74], 2
mov ecx, esp
mov dword [esp + 0x68], esp
push 0xffffffffffffffff
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], ebx
push ebx
lea eax, [esp + 0x88]
mov word [ecx + 4], bx
call fcn.00401110
mov esi, ebp
mov byte [esp + 0x74], 1
call fcn.0040eb80
cmp eax, ebx
jne 0x40eeb8
mov esi, 8
cmp dword [esp + 0x5c], esi
jb 0x40ee89
mov edx, dword [esp + 0x48]
push edx
call fcn.0044ec2b
add esp, 4
cmp dword [esp + 0x78], esi
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], bx
jb 0x40edf6
mov eax, dword [esp + 0x64]
push eax
call fcn.0044ec2b
add esp, 4
xor eax, eax
jmp 0x40f0f1
mov ecx, ebp
call fcn.0040ec40
test eax, eax
je 0x40f065
mov ecx, dword [ebp + 0x10]
push ebx
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40eeef
lea esi, [esp + 0x44]
call fcn.00401010
lea esi, [esp + 0x60]
call fcn.00401010
xor eax, eax
jmp 0x40f0f1
push ebp
lea edi, [esp + 0x24]
call fcn.0040ecc0
cmp eax, ebx
je 0x40f061
push 0xc
mov dword [esp + 0x20], ebx
call fcn.0044f07d
add esp, 4
cmp eax, ebx
je 0x40ef27
mov dword [eax], vtable.CFileIOCtrl.0
mov dword [eax + 4], ebx
mov dword [eax + 8], 1
mov esi, eax
jmp 0x40ef29
xor esi, esi
mov dword [esi + 4], ebx
mov dword [esi + 8], 1
cmp dword [esp + 0x78], 8
mov edx, dword [esp + 0x64]
push 1
mov dword [esp + 0x1c], esi
push 2
mov edi, 0xc0000000
jae 0x40ef4f
lea edx, [esp + 0x6c]
sub esp, 0x1c
mov eax, esp
mov dword [esp + 0x50], esp
call fcn.00401da0
mov edx, edi
call fcn.0040a8c0
mov eax, dword [esi + 4]
cmp eax, ebx
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x2c], ebx
je 0x40ef89
mov edx, dword [esp + 0x20]
push ebx
push ebx
push edx
push eax
call edi
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ecx, dword [esi + 4]
push ebx
push ebx
push ebx
push ecx
call edi
mov eax, dword [ebp + 0x10]
lea edx, [esp + 0x14]
push edx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x40f061
mov eax, dword [esp + 0x14]
cmp eax, ebx
jbe 0x40f059
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40efc0
cmp eax, 0x1000
jbe 0x40efcf
mov dword [esp + 0x14], 0x1000
mov ecx, dword [ebp + 0x14]
push 0x1000
push ebx
push ecx
call fcn.00452a60
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x14]
add esp, 0xc
lea edx, [esp + 0x24]
push edx
mov edx, dword [ebp + 0x10]
push eax
push ecx
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40f061
mov ecx, dword [esp + 0x24]
mov edx, dword [ebp + 0x14]
push ebx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esi + 4]
push ecx
push edx
push eax
call edi
mov ecx, dword [esp + 0x24]
mov eax, dword [ebp + 0x18]
add dword [esp + 0x1c], ecx
cmp eax, ebx
je 0x40f03a
mov edx, dword [ebp + 0x1c]
push edx
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x24]
push ecx
push edx
push ebx
call eax
add esp, 0x14
test eax, eax
je 0x40f059
mov ecx, dword [ebp + 0x10]
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x40f061
mov eax, dword [esp + 0x14]
cmp eax, ebx
ja 0x40efc0
mov dword [esp + 0x28], 1
mov edi, dword [esp + 0x18]
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x40f076
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp + 0x10], ebx
cmp edi, ebx
je 0x40f0b1
mov edx, dword [edi + 4]
mov esi, dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edx
call esi
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x40f09d
push eax
call esi
mov eax, dword [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 4], ebx
mov dword [edi + 4], ebx
mov dword [edi + 8], 1
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
mov esi, 8
cmp dword [esp + 0x5c], esi
jb 0x40f0c9
mov ecx, dword [esp + 0x48]
push ecx
call fcn.0044ec2b
add esp, 4
cmp dword [esp + 0x78], esi
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], bx
jb 0x40f0ed
mov edx, dword [esp + 0x64]
push edx
call fcn.0044ec2b
add esp, 4
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x3c