Function at 0x10005fc0
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Set http header
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor eax, eax
mov dword [ebp - 8], 0
push edi
mov edi, dword [ebp + 0x1c]
mov esi, 0x10000000
test edi, edi
push 1
cmovne esi, eax
mov eax, 0x10038020
xor ecx, ecx
test edi, edi
push 0x10
cmove eax, ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], eax
call fcn.100081bb
mov ebx, eax
add esp, 8
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x10006025
mov edi, dword [ebx + 0xc]
push eax
call fcn.10009614
add esp, 4
mov dword [ebx + 0xc], eax
test edi, edi
je 0x10006022
push edi
call fcn.100081fb
add esp, 4
mov edi, dword [ebp + 0x1c]
push esi
push 0
push 0
push 0
push str.lum_sdk_1.454.988
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebx], eax
test eax, eax
je 0x10006218
test edi, edi
jne 0x10006060
push edi
push 0x610800
push 0x10006a80
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
cmp eax, 0xffffffff
je 0x10006218
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x800
push eax
push 0x54
push dword [ebx]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov edi, eax
call fcn.100080e3
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
test edi, edi
je 0x10006218
mov esi, dword [ebp + 0xc]
mov ecx, 0x1bb
cmp esi, ecx
mov eax, 0x50
push 0
cmove eax, ecx
movzx eax, ax
push eax
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebx + 4], ecx
test ecx, ecx
je 0x10006218
xor eax, eax
mov edx, 0x800000
cmp esi, 0x1bb
cmove eax, edx
push eax
push dword [ebp - 0xc]
push 0
push 0
push dword [ebp + 0x10]
push dword [ebp + 0x14]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebx + 8], eax
test eax, eax
je 0x10006218
cmp dword [ebp + 0x18], 0
je 0x10006111
push 0x20000000
push 0xffffffffffffffff
push str.Content_Type:_application_x_www_form_urlencoded
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x10006218
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x1000612b
mov ecx, esi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10006120
sub ecx, edx
jmp 0x1000612d
xor ecx, ecx
test esi, esi
je 0x10006141
mov edx, esi
lea edi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x10006136
sub edx, edi
jmp 0x10006143
xor edx, edx
push ebx
push ecx
push edx
push esi
push 0
push 0
push dword [ebx + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x10006218
mov esi, dword [ebp + 0x1c]
test esi, esi
jne 0x1000616c
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push dword [ebx + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x10006218
push 0x1002fbd8
push esi
call fcn.10005970
add esp, 8
mov dword [ebp - 4], eax
test eax, eax
je 0x10006218
lea eax, [ebp + 0x18]
mov dword [ebp + 0x18], 0
push eax
push dword [ebx + 8]
mov dword [ebp + 0x1c], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x10006218
mov esi, dword [ebp + 0x18]
lea eax, [esi + 1]
push eax
push 0
call fcn.10009f25
add esp, 8
mov edi, eax
lea eax, [ebp + 0x1c]
push eax
push esi
push edi
push dword [ebx + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x10006218
push dword [ebp - 4]
push dword [ebp + 0x1c]
push 1
push edi
call fcn.10007a7e
mov ecx, dword [ebp + 0x1c]
add esp, 0x10
cmp eax, ecx
jne 0x10006218
test ecx, ecx
je 0x1000623d
lea eax, [ebp + 0x18]
mov dword [ebp + 0x18], 0
push eax
push dword [ebx + 8]
mov dword [ebp + 0x1c], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x100061b7
or esi, 0xffffffff
push ebx
call fcn.10006a00
mov eax, dword [ebp - 4]
add esp, 4
test eax, eax
je 0x10006234
push eax
call fcn.1000a792
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
jmp 0x1000621b