Function at 0x59d3e4
Capabilities:
Check http status code
Connect to http server
Create http request
Read data from internet
Receive data
Resolve function by parsing pe exports
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x213
push 0
push 0
dec ecx
jne 0x59d3ec
push ecx
push ebx
push esi
push edi
mov esi, eax
lea eax, [ebp - 0x105c]
mov edx, dword [0x594150]
call fcn.00505690
xor eax, eax
push ebp
push 0x59dd85
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 0
xor eax, eax
mov dword [esi + 0x80], eax
mov dword [ebp - 8], 0x600000
mov eax, dword [esi + 4]
call fcn.00594420
test al, al
je 0x59d43e
or dword [ebp - 8], 0x800000
cmp byte [esi + 0xb0], 0
je 0x59d457
mov eax, dword [ebp - 8]
or eax, 0x1000
or eax, 0x2000
mov dword [ebp - 8], eax
cmp byte [esi + 0xb1], 0
je 0x59d467
or dword [ebp - 8], 0x80000
cmp dword [esi + 0x74], 0
je 0x59d474
or dword [ebp - 8], 0x80000
cmp dword [esi + 0x34], 0
je 0x59d49e
mov ecx, dword [esi + 0x34]
lea eax, [ebp - 0x1060]
mov edx, 0x59dda0
call fcn.00504e38
mov edx, dword [ebp - 0x1060]
mov eax, dword [esi + 0xb4]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [esi + 0x30], 0
je 0x59d4db
lea ecx, [ebp - 0x1068]
mov eax, dword [esi + 0x30]
mov dl, 0x22
call fcn.00593550
mov ecx, dword [ebp - 0x1068]
lea eax, [ebp - 0x1064]
mov edx, 0x59ddbc
call fcn.00504e38
mov edx, dword [ebp - 0x1064]
mov eax, dword [esi + 0xb4]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp byte [esi + 0x10], 0
je 0x59d4f1
mov eax, dword [esi + 0xb4]
mov edx, 0x59ddd4
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp byte [esi + 0x7c], 0
je 0x59d550
cmp dword [esi + 0x74], 0
je 0x59d550
push dword [esi + 0x74]
push 0x59ddf4
push dword [esi + 0x78]
lea eax, [ebp - 0x1074]
mov edx, 3
call fcn.00504eac
mov eax, dword [ebp - 0x1074]
lea edx, [ebp - 0x1070]
call fcn.00595674
mov ecx, dword [ebp - 0x1070]
lea eax, [ebp - 0x106c]
mov edx, 0x59de00
call fcn.00504e38
mov edx, dword [ebp - 0x106c]
mov eax, dword [esi + 0xb4]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [esi + 0x5c], 0
je 0x59d5c2
cmp byte [esi + 0x6c], 0
je 0x59d566
mov eax, 0x59de18
mov dword [ebp - 0x3c], eax
jmp 0x59d56b
xor eax, eax
mov dword [ebp - 0x3c], eax
mov ebx, 3
push 0
mov eax, dword [ebp - 0x3c]
push eax
push dword [esi + 0x5c]
push 0x59ddf4
lea edx, [ebp - 0x107c]
mov eax, dword [esi + 0x68]
call fcn.0050a98c
push dword [ebp - 0x107c]
lea eax, [ebp - 0x1078]
mov edx, 3
call fcn.00504eac
mov eax, dword [ebp - 0x1078]
call fcn.00504fec
push eax
push ebx
mov eax, dword [esi + 8]
call fcn.00504fec
push eax
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0xc], eax
jmp 0x59d5dc
xor ebx, ebx
push 0
push 0
push 0
push ebx
mov eax, dword [esi + 8]
call fcn.00504fec
push eax
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x59d5ef
call sub.kernel32.dll_GetLastError
mov dword [esi + 0xc], eax
jmp 0x59dd2e
xor edx, edx
push ebp
push 0x59dd27
push dword fs:[edx]
mov dword fs:[edx], esp
xor eax, eax
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x105c]
mov eax, dword [esi + 4]
call fcn.005945a4
push 0
push 0
push 3
push 0
push 0
mov ax, word [ebp - 0x1044]
push eax
mov eax, dword [ebp - 0x1058]
call fcn.00504fec
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.wininet.dll_InternetConnectA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x59d657
call sub.kernel32.dll_GetLastError
mov dword [esi + 0xc], eax
call fcn.0050451c
jmp 0x59dd2e
cmp byte [esi + 0xb2], 1
jne 0x59d66f
lea eax, [ebp - 0x34]
mov edx, 0x59de28
call fcn.00504bb4
jmp 0x59d67c
lea eax, [ebp - 0x34]
mov edx, 0x59de3c
call fcn.00504bb4
push 0
mov eax, dword [ebp - 8]
push eax
push 0
push 0
mov eax, dword [ebp - 0x34]
call fcn.00504fec
push eax
lea eax, [ebp - 0x1080]
mov ecx, dword [ebp - 0x1048]
mov edx, dword [ebp - 0x1054]
call fcn.00504e38
mov eax, dword [ebp - 0x1080]
call fcn.00504fec
push eax
push 0x59de48
mov eax, dword [ebp - 0x10]
push eax
call sub.wininet.dll_HttpOpenRequestA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x59d6db
call sub.kernel32.dll_GetLastError
mov dword [esi + 0xc], eax
call fcn.0050451c
jmp 0x59dd2e
mov eax, dword [esi + 0x18]
test eax, eax
jbe 0x59d6f1
mov ecx, eax
mov edx, 2
mov eax, dword [ebp - 0x14]
call fcn.00595618
mov eax, dword [esi + 0x1c]
test eax, eax
jbe 0x59d707
mov ecx, eax
mov edx, 6
mov eax, dword [ebp - 0x14]
call fcn.00595618
mov eax, dword [esi + 0x20]
test eax, eax
jbe 0x59d71d
mov ecx, eax
mov edx, 3
mov eax, dword [ebp - 0x14]
call fcn.00595618
cmp dword [esi + 0x74], 0
je 0x59d733
mov ecx, dword [esi + 0x74]
mov edx, 0x1c
mov eax, dword [ebp - 0x14]
call fcn.005955b0
cmp dword [esi + 0x78], 0
je 0x59d749
mov ecx, dword [esi + 0x78]
mov edx, 0x1d
mov eax, dword [ebp - 0x14]
call fcn.005955b0
lea edx, [ebp - 0x1084]
mov eax, dword [esi + 0xb4]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x1084]
lea ecx, [ebp - 0x38]
mov dl, 0xd
call fcn.005932d0
xor ebx, ebx
push 0
push 0
mov eax, dword [ebp - 0x38]
call fcn.00504dec
push eax
mov eax, dword [ebp - 0x38]
call fcn.00504fec
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_HttpSendRequestA
test eax, eax
jne 0x59d7a1
call sub.kernel32.dll_GetLastError
mov dword [esi + 0xc], eax
call fcn.0050451c
jmp 0x59dd2e
mov dword [ebp - 0x1c], 4
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [esi + 0x80]
push eax
push 0x13
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_HttpQueryInfoA
test eax, eax
je 0x59d9b7
lea eax, [ebp - 0x1088]
lea edx, [esi + 0x80]
call fcn.00504d24
mov eax, dword [ebp - 0x1088]
xor edx, edx
call fcn.0050ab04
mov dword [esi + 0x80], eax
lea ecx, [esi + 0x58]
mov edx, 0x16
mov eax, dword [ebp - 0x14]
call fcn.0059d350
mov eax, dword [esi + 0x80]
cmp eax, 0x12d
je 0x59d822
cmp eax, 0x12e
je 0x59d822
cmp eax, 0x133
jne 0x59d8d2
lea ecx, [esi + 0x50]
mov edx, 0x21
mov eax, dword [ebp - 0x14]
call fcn.0059d350
cmp dword [esi + 0x50], 0
je 0x59d88c
mov eax, dword [esi + 0x50]
mov edx, 0x59de54
call fcn.005933ec
test al, al
jne 0x59d88c
lea eax, [ebp - 0x1090]
mov edx, dword [esi + 0x50]
call fcn.005053f4
mov eax, dword [ebp - 0x1090]
push eax
lea eax, [ebp - 0x1094]
mov edx, dword [esi + 4]
call fcn.005053f4
mov eax, dword [ebp - 0x1094]
lea ecx, [ebp - 0x108c]
pop edx
call fcn.00594488
mov edx, dword [ebp - 0x108c]
lea eax, [esi + 0x50]
call fcn.00504db4
lea eax, [esi + 4]
mov edx, dword [esi + 0x50]
call fcn.00504b70
lea ecx, [ebp - 0x1d]
mov edx, dword [esi + 0x80]
mov eax, esi
call fcn.0059d330
cmp byte [ebp - 0x1d], 2
jne 0x59d8b7
call fcn.0050451c
jmp 0x59dd2e
inc dword [ebp - 0x28]
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp - 0x28]
jg 0x59d607
sub dword [ebp - 8], 0x200000
jmp 0x59d607
cmp eax, 0x191
jne 0x59d92a
cmp dword [ebp - 0x24], 0
jne 0x59d90c
cmp dword [esi + 0x74], 0
je 0x59d90c
mov ecx, dword [esi + 0x74]
mov edx, 0x1c
mov eax, dword [ebp - 0x14]
call fcn.005955b0
mov ecx, dword [esi + 0x78]
mov edx, 0x1d
mov eax, dword [ebp - 0x14]
call fcn.005955b0
mov bl, 1
jmp 0x59d98f
cmp byte [esi + 0x7d], 0
je 0x59d98f
mov edx, 0x2eee
mov eax, dword [ebp - 0x14]
call fcn.0059d308
cmp eax, 0x2f00
jne 0x59d98f
mov bl, 1
jmp 0x59d98f
cmp eax, 0x197
jne 0x59d98f
cmp dword [ebp - 0x24], 0
jne 0x59d973
cmp dword [esi + 0x60], 0
jne 0x59d943
cmp dword [esi + 0x64], 0
je 0x59d973
cmp dword [esi + 0x60], 0
je 0x59d959
mov ecx, dword [esi + 0x60]
mov edx, 0x2b
mov eax, dword [ebp - 0x14]
call fcn.005955b0
cmp dword [esi + 0x64], 0
je 0x59d96f
mov ecx, dword [esi + 0x64]
mov edx, 0x2c
mov eax, dword [ebp - 0x14]
call fcn.005955b0
mov bl, 1
jmp 0x59d98f
cmp byte [esi + 0x7d], 0
je 0x59d98f
mov edx, 0x2eee
mov eax, dword [ebp - 0x14]
call fcn.0059d308
cmp eax, 0x2f00
jne 0x59d98f
mov bl, 1
lea ecx, [ebp - 0x1d]
mov edx, dword [esi + 0x80]
mov eax, esi
call fcn.0059d330
cmp byte [ebp - 0x1d], 2
jne 0x59d9af
call fcn.0050451c
jmp 0x59dd2e
cmp byte [ebp - 0x1d], 1
jne 0x59d9b7
mov bl, 1
test bl, bl
je 0x59d9f3
inc dword [ebp - 0x24]
mov ecx, dword [esi + 0x20]
test ecx, ecx
jbe 0x59da10
mov eax, dword [ebp - 0x24]
cdq
push edx
push eax
mov eax, ecx
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x59d9de
cmp eax, dword [esp]
pop edx
pop eax
jae 0x59da10
jmp 0x59d9e2
pop edx
pop eax
jge 0x59da10
mov dword [esi + 0xc], 0x386
call fcn.0050451c
jmp 0x59dd2e
test bl, bl
jne 0x59da10
mov eax, dword [esi + 0x80]
call fcn.0059559c
test al, al
je 0x59da10
call fcn.0050451c
jmp 0x59dd2e
test bl, bl
jne 0x59d76a
lea ecx, [ebp - 0x30]
mov edx, 0x1a
mov eax, dword [ebp - 0x14]
call fcn.0059d350
test al, al
je 0x59da37
lea eax, [esi + 0x40]
mov edx, dword [ebp - 0x30]
call fcn.00504b70
lea ecx, [ebp - 0x30]
mov edx, 0x3f
mov eax, dword [ebp - 0x14]
call fcn.0059d350
test al, al
je 0x59da56
lea eax, [esi + 0x44]
mov edx, dword [ebp - 0x30]
call fcn.00504b70
lea ecx, [ebp - 0x30]
mov edx, 0x1d
mov eax, dword [ebp - 0x14]
call fcn.0059d350
test al, al
je 0x59da75
lea eax, [esi + 0x48]
mov edx, dword [ebp - 0x30]
call fcn.00504b70
lea ecx, [esi + 0x34]
mov edx, 0xb
mov eax, dword [ebp - 0x14]
call fcn.0059d350
lea ecx, [esi + 0x30]
mov edx, 0x36
mov eax, dword [ebp - 0x14]
call fcn.0059d350
lea ecx, [esi + 0x3c]
mov edx, 1
mov eax, dword [ebp - 0x14]
call fcn.0059d350
test al, al
je 0x59daec
mov eax, dword [esi + 0x3c]
mov ecx, 1
mov edx, 0x59de60
call fcn.00593358
mov ebx, eax
test ebx, ebx
jle 0x59daec
mov eax, dword [esi + 0x3c]
call fcn.00504dec
mov edx, eax
sub edx, ebx
sub edx, 7
lea ecx, [ebp - 0x1098]
mov eax, dword [esi + 0x3c]
call fcn.0053ce2c
mov edx, dword [ebp - 0x1098]
lea eax, [esi + 0x38]
call fcn.00504b70
lea ecx, [ebp - 0x30]
mov edx, 5
mov eax, dword [ebp - 0x14]
call fcn.0059d350
test al, al
je 0x59db0d
xor edx, edx
mov eax, dword [ebp - 0x30]
call fcn.0050ab04
mov dword [esi + 0x4c], eax
lea ecx, [ebp - 0x30]
mov edx, 0x2f
mov eax, dword [ebp - 0x14]
call fcn.0059d350
test al, al
je 0x59db2c
lea eax, [esi + 0x54]
mov edx, dword [ebp - 0x30]
call fcn.00504b70
cmp word [esi + 0x92], 0
je 0x59db5b
mov byte [ebp - 0x1d], 0
lea ecx, [ebp - 0x1d]
mov edx, esi
mov eax, dword [esi + 0x94]
call dword [esi + 0x90]
cmp byte [ebp - 0x1d], 2
jne 0x59db5b
call fcn.0050451c
jmp 0x59dd2e
cmp byte [esi + 0x24], 0
je 0x59db6b
call fcn.0050451c
jmp 0x59dd2e
ret
add dword [eax], eax
invalid
cmp word [esi + 0x9a], 0
je 0x59db9a
mov byte [ebp - 0x1d], 0
lea ecx, [ebp - 0x1d]
mov edx, esi
mov eax, dword [esi + 0x9c]
call dword [esi + 0x98]
cmp byte [ebp - 0x1d], 2
jne 0x59db9a
call fcn.0050451c
jmp 0x59dd2e
cmp dword [esi + 0x28], 0
jne 0x59dbaa
call fcn.0050451c
jmp 0x59dd2e
or ebx, 0xffffffff
xor eax, eax
mov dword [esi + 0x84], eax
lea eax, [ebp - 0x103d]
xor ecx, ecx
mov edx, 0x1001
call fcn.00503594
lea eax, [ebp - 0x2c]
push eax
push 0x1000
lea eax, [ebp - 0x103d]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetReadFile
test eax, eax
jne 0x59dbf6
call sub.kernel32.dll_GetLastError
mov dword [esi + 0xc], eax
call fcn.0050451c
jmp 0x59dd2e
cmp dword [ebp - 0x2c], 0
je 0x59dc8a
mov eax, dword [ebp - 0x2c]
add dword [esi + 0x84], eax
lea edx, [ebp - 0x103d]
mov eax, dword [esi + 0x28]
mov ecx, dword [ebp - 0x2c]
call fcn.00520320
mov edi, dword [esi + 0x4c]
test edi, edi
jle 0x59dc80
cmp word [esi + 0xaa], 0
je 0x59dc80
fild dword [esi + 0x84]
mov dword [ebp - 0x109c], edi
fild dword [ebp - 0x109c]
fdivp st(1)
fmul dword [0x59de6c]
call fcn.00503350
cmp ebx, eax
je 0x59dc80
mov ebx, eax
mov byte [ebp - 0x1d], 0
mov eax, dword [esi + 0x4c]
push eax
lea eax, [ebp - 0x1d]
push eax
mov ecx, dword [esi + 0x84]
mov edx, esi
mov eax, dword [esi + 0xac]
call dword [esi + 0xa8]
cmp byte [ebp - 0x1d], 2
jne 0x59dc80
call fcn.0050451c
jmp 0x59dd2e
cmp dword [ebp - 0x2c], 0
jne 0x59dbb5
cmp byte [esi + 0x10], 0
je 0x59dcc2
cmp dword [esi + 0x84], 0
jle 0x59dcc2
mov eax, dword [esi + 0x48]
mov edx, 0x59de78
call fcn.00504f38
jne 0x59dcc2
mov eax, dword [esi + 0x28]
call fcn.0059ceac
test al, al
jne 0x59dcc2
mov dword [esi + 0xc], 0x385
call fcn.0050451c
jmp 0x59dd2e
cmp word [esi + 0xa2], 0
je 0x59dcee
mov byte [ebp - 0x1d], 0
lea ecx, [ebp - 0x1d]
mov edx, esi
mov eax, dword [esi + 0xa4]
call dword [esi + 0xa0]
cmp byte [ebp - 0x1d], 2
jne 0x59dcee
call fcn.0050451c
jmp 0x59dd2e
mov byte [ebp - 1], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59dd2e
cmp dword [ebp - 0x14], 0
je 0x59dd0e
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetCloseHandle
cmp dword [ebp - 0x10], 0
je 0x59dd1d
mov eax, dword [ebp - 0x10]
push eax
call sub.wininet.dll_InternetCloseHandle
mov eax, dword [ebp - 0xc]
push eax
call sub.wininet.dll_InternetCloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59dd8c
lea eax, [ebp - 0x1098]
call fcn.00504b1c
lea eax, [ebp - 0x1094]
mov edx, 3
call fcn.00505250
lea eax, [ebp - 0x1088]
mov edx, 0xb
call fcn.00504b40
lea eax, [ebp - 0x105c]
mov edx, dword [0x594150]
call fcn.00505760
lea eax, [ebp - 0x38]
mov edx, 3
call fcn.00504b40
ret