Function at 0x415510
Capabilities:
Delete file
Initialize winhttp library
Print debug messages
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e7638
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x53f1e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov esi, edx
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0xc]
xor ebx, ebx
mov dword [ebp - 0x3c], ecx
cmp eax, ebx
je 0x41555b
push eax
call edi
mov dword [esi + 0xc], ebx
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x415568
push eax
call edi
mov dword [esi + 8], ebx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x415575
push eax
call edi
mov dword [esi + 4], ebx
push ebx
push ebx
push ebx
push ebx
push 0x507ea8
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x415599
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x507ee0
jmp 0x4155e5
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
push edx
mov edx, dword [esi + 0x14]
push ecx
push edx
push ebx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov eax, dword [ebp - 0x34]
push eax
xor ecx, ecx
mov edx, esi
mov byte [ebp - 0x2d], bl
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], ebx
call fcn.00415c90
test al, al
je 0x4155f5
lea edi, [ebp - 0x48]
call fcn.00415c10
test al, al
jne 0x4155fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryContentLength
push 0x508050
lea edi, [esi + 0x20]
call fcn.00408a70
add esp, 0xc
xor al, al
jmp 0x4157fa
xor ecx, ecx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], cx
lea edx, [ebp - 0x2c]
push edx
mov edi, esi
mov dword [ebp - 4], ebx
call fcn.00415b80
test al, al
je 0x41564f
push 3
push 0x507f54
lea eax, [ebp - 0x2c]
push eax
xor eax, eax
call fcn.0040d750
cmp eax, 0xffffffff
je 0x41564f
push str.QueryRawHeaders404
push esi
call fcn.00415f60
lea ecx, [ebp - 0x2c]
call fcn.00404a50
xor al, al
jmp 0x4157fa
mov ecx, dword [ebp - 0x3c]
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x41568a
push 0x507f88
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x2c]
call fcn.00404a50
xor al, al
jmp 0x4157fa
mov edx, dword [ebp - 0x48]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push edx
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
push 0
push 0
push ebx
call edi
mov ecx, dword [esi + 0xc]
lea eax, [ebp - 0x38]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x4156dd
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x2c]
call fcn.00404a50
xor al, al
jmp 0x4157fa
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x4156fb
mov eax, dword [ecx]
mov edx, dword [eax]
call edx
test eax, eax
je 0x4156fb
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x3c]
push eax
jmp 0x4156c8
push 0x100000
call fcn.004b30cc
mov edi, dword [ebp - 0x38]
add esp, 4
mov dword [ebp - 0x34], eax
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x415726
mov edx, dword [ecx]
mov eax, dword [edx]
call eax
test eax, eax
jne 0x4157cc
mov edi, dword [ebp - 0x38]
cmp edi, 0x100000
jbe 0x415746
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.004b3515
mov edi, dword [ebp - 0x38]
push edi
call fcn.004b30cc
add esp, 8
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov ecx, dword [esi + 0xc]
lea edx, [ebp - 0x40]
push edx
push edi
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x4157cc
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x41576e
mov edx, dword [ecx]
mov eax, dword [edx]
call eax
test eax, eax
jne 0x4157cc
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x34]
push 0
lea ecx, [ebp - 0x4c]
push ecx
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4157cc
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x4c]
jne 0x4157cc
mov ecx, dword [esi + 0x24]
add dword [ebp - 0x44], eax
test ecx, ecx
je 0x4157ab
mov eax, dword [esi + 0x10]
mov edx, dword [ecx]
mov edx, dword [edx]
push eax
mov eax, dword [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x48]
push eax
call edx
mov ecx, dword [esi + 0xc]
lea eax, [ebp - 0x38]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x4157cc
mov edi, dword [ebp - 0x38]
test edi, edi
jne 0x41570e
mov byte [ebp - 0x2d], 1
mov edx, dword [ebp - 0x34]
push edx
call fcn.004b3515
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [ebp - 0x2d]
test bl, bl
jne 0x4157f0
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x2c]
call fcn.00404a50
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b1c2d
mov esp, ebp
pop ebp
ret 4