Function at 0x4079f0
Capabilities:
Check http status code
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f340
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x10c38
call fcn.0040d7a0
mov eax, dword [0x4280f0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xorps xmm0, xmm0
push 0x1001
mov dword [ebp - 0x10c48], eax
lea eax, [ebp - 0x4fbc]
push 0
push eax
mov dword [ebp - 0x10c44], 0
mov dword [ebp - 0x10c38], 0
mov dword [ebp - 0x10c2c], 0
mov byte [ebp - 0x10c2d], 1
movq qword [ebp - 0x38], xmm0
movq qword [ebp - 0x30], xmm0
movq qword [ebp - 0x28], xmm0
movq qword [ebp - 0x20], xmm0
mov byte [ebp - 0x18], 0
call fcn.0040b2e0
push 0x1001
lea eax, [ebp - 0x3fb8]
push 0
push eax
call fcn.0040b2e0
push 0x1001
lea eax, [ebp - 0x5fc0]
push 0
push eax
call fcn.0040b2e0
push 0x2774
lea eax, [ebp - 0x2fb4]
push 0
push eax
call fcn.0040b2e0
push 0x401
lea eax, [ebp - 0x43c]
push 0
push eax
call fcn.0040b2e0
push 0x2711
lea eax, [ebp - 0xade8]
push 0
push eax
call fcn.0040b2e0
add esp, 0x48
lea eax, [ebp - 0xfc10]
push 0x2711
push 0
push eax
call fcn.0040b2e0
push 0x2711
lea eax, [ebp - 0x86d4]
push 0
push eax
call fcn.0040b2e0
push 0x2711
lea eax, [ebp - 0xd4fc]
push 0
push eax
call fcn.0040b2e0
push 0x420c7c
call fcn.0040a680
lea eax, [ebp - 0x840]
push eax
call fcn.004051b0
add esp, 0x2c
cmp al, 1
jne 0x407c2e
lea ecx, [ebp - 0x840]
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407b50
lea eax, [ebp - 0x840]
push eax
lea eax, [ebp - 0x2fb4]
sub ecx, edx
je 0x407c0d
push 0x420c98
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
add esp, 0x10
push 0x42d830
mov dword [ebp - 4], 0
call fcn.00404370
add esp, 4
push 0
push 0
push 0
push 0
push str.mns32n_HTTPS
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x10c40], eax
test eax, eax
jne 0x407c4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x43c]
push str.WinInet
push eax
call fcn.0040b03e
lea eax, [ebp - 0x43c]
push eax
call fcn.0040a680
push 0x401
lea eax, [ebp - 0x43c]
push 0
push eax
call fcn.0040b2e0
add esp, 0x1c
lea eax, [ebp - 0x10c2f]
push 0x426024
push eax
mov byte [ebp - 0x10c2f], 0
call fcn.0040d35c
push 0x420cb8
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
add esp, 0x10
xor al, al
jmp 0x4086a5
test al, al
jne 0x407b86
push 0x420cd8
call fcn.0040a680
add esp, 4
xor al, al
jmp 0x4086a5
push 0
push 0
push 3
push 0
push 0
push 0x1bb
lea ecx, [ebp - 0x840]
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x10c44], eax
test eax, eax
jne 0x407cc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x43c]
push 0x420d20
push eax
call fcn.0040b03e
lea eax, [ebp - 0x43c]
push eax
call fcn.0040a680
push 0x401
lea eax, [ebp - 0x43c]
push 0
push eax
call fcn.0040b2e0
add esp, 0x1c
lea eax, [ebp - 0x10c31]
push 0x426024
push eax
mov byte [ebp - 0x10c31], 0
call fcn.0040d35c
push 0
push 0x84a00000
lea ecx, [ebp - 0x10c1c]
push ecx
push str.HTTP_1.1
push 0
push str._Dreams_bin_sub_X12HCGI3.exe
push str.POST
push eax
mov dword [ebp - 0x10c1c], 0x420d50
mov dword [ebp - 0x10c18], 0
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ebx, eax
mov dword [ebp - 0x10c38], ebx
test ebx, ebx
jne 0x407d59
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x43c]
push 0x420d88
push eax
call fcn.0040b03e
lea eax, [ebp - 0x43c]
push eax
call fcn.0040a680
push 0x401
lea eax, [ebp - 0x43c]
push ebx
push eax
call fcn.0040b2e0
add esp, 0x1c
lea eax, [ebp - 0x10c34]
push 0x426024
push eax
mov byte [ebp - 0x10c34], bl
call fcn.0040d35c
mov ecx, esi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407d60
lea eax, [ebp - 0x10c24]
push eax
sub ecx, edx
push ecx
lea eax, [ebp - 0x4fbc]
push eax
push esi
call fcn.00401ee0
push 0x2774
lea eax, [ebp - 0x2fb4]
push 0
push eax
call fcn.0040b2e0
lea eax, [ebp - 0x4fbc]
push eax
lea eax, [ebp - 0x2fb4]
push 0x420dac
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
push 0x2774
lea eax, [ebp - 0x2fb4]
push 0
push eax
call fcn.0040b2e0
add esp, 0x38
cmp byte [0x42c3e2], 0
jne 0x407e94
lea eax, [ebp - 0x10c20]
push eax
call dword [sym.imp.X400100004W.dll_char____cdecl_GetAccessToken_int__]
add esp, 4
mov edx, eax
lea ecx, [ebp - 0xd4fc]
mov al, byte [edx]
mov byte [ecx], al
lea edx, [edx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x407df0
mov esi, dword [ebp - 0x10c20]
push 0x2774
lea eax, [ebp - 0x2fb4]
push 0
push eax
call fcn.0040b2e0
lea eax, [ebp - 0x2fb4]
cmp esi, 0xffffffff
je 0x407e71
push esi
push 0x420dc8
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
push 0x2711
push 0
push 0x4298c8
call fcn.0040b2e0
add esp, 0x28
xor ecx, ecx
mov al, byte [ebp + ecx - 0xd4fc]
mov byte [ecx + 0x4298c8], al
lea ecx, [ecx + 1]
test al, al
jne 0x407e50
push dword [ebp - 0x10c20]
push 0x420e0c
jmp 0x407ebf
push 0xffffffffffffffff
push 0x420e48
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
add esp, 0x1c
xor al, al
jmp 0x4086a5
xor ecx, ecx
jmp 0x407ea0
mov al, byte [ecx + 0x4298c8]
mov byte [ebp + ecx - 0xd4fc], al
lea ecx, [ecx + 1]
test al, al
jne 0x407ea0
push dword [ebp - 0x10c20]
push 0x420e90
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
add esp, 0x10
lea eax, [ebp - 0xd4fc]
push eax
push str.Authorization:_Bearer__s_r_n
lea eax, [ebp - 0xade8]
push 0x2711
push eax
call fcn.0040b0c0
mov esi, dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
add esp, 0x10
lea eax, [ebp - 0xade8]
push 0xa0000000
push 0xffffffffffffffff
push eax
push ebx
call esi
push 0x42d830
push str.X_DREAMS_BASE_SERVER_NAME:__s_r_n
lea eax, [ebp - 0x86d4]
push 0x2711
push eax
call fcn.0040b0c0
add esp, 0x10
lea eax, [ebp - 0x86d4]
push 0xa0000000
push 0xffffffffffffffff
push eax
push ebx
call esi
push 0xa0000000
push 0xffffffffffffffff
push str.Content_Type:_application_x_www_form_urlencoded_r_n
push ebx
call esi
lea ecx, [ebp - 0x4fbc]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407f58
sub ecx, edx
push ecx
push str.Content_Length:__d_r_n
lea eax, [ebp - 0xfc10]
push 0x2711
push eax
call fcn.0040b0c0
add esp, 0x10
lea eax, [ebp - 0xfc10]
push 0xa0000000
push 0xffffffffffffffff
push eax
push ebx
call esi
lea ecx, [ebp - 0x4fbc]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407f95
sub ecx, edx
push ecx
lea eax, [ebp - 0x4fbc]
push eax
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4081bd
call edi
mov esi, eax
cmp esi, 0x2f0c
jne 0x407fd2
push 0x420f5c
jmp 0x408000
cmp esi, 0x2f0d
jne 0x407ff3
push str.HttpSendRequest
call fcn.0040a680
push str.SSL
call fcn.0040a680
add esp, 8
jmp 0x408008
cmp esi, 0x2efe
jne 0x408008
push 0x420fe8
call fcn.0040a680
add esp, 4
call edi
test eax, eax
je 0x4081bd
push esi
lea eax, [ebp - 0x43c]
push 0x42100c
push eax
call fcn.0040b03e
lea eax, [ebp - 0x43c]
push eax
call fcn.0040a680
push 0x401
lea eax, [ebp - 0x43c]
push 0
push eax
call fcn.0040b2e0
push 0x2774
lea eax, [ebp - 0x2fb4]
push 0
push eax
call fcn.0040b2e0
lea eax, [ebp - 0x10c20]
push eax
call dword [sym.imp.X400100004W.dll_char____cdecl_GetAccessToken_int__]
add esp, 0x2c
mov esi, eax
push 0x2711
lea eax, [ebp - 0xd4fc]
push 0
push eax
call fcn.0040b2e0
add esp, 0xc
lea ecx, [ebp - 0xd4fc]
mov al, byte [esi]
mov byte [ecx], al
lea esi, [esi + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x408084
mov esi, dword [ebp - 0x10c20]
push 0x2774
lea eax, [ebp - 0x2fb4]
push 0
push eax
call fcn.0040b2e0
lea eax, [ebp - 0x2fb4]
cmp esi, 0xffffffff
je 0x40825b
push esi
push 0x421030
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
lea eax, [ebp - 0xd4fc]
push eax
push str.Authorization:_Bearer__s_r_n
lea eax, [ebp - 0xade8]
push 0x2711
push eax
call fcn.0040b0c0
mov esi, dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
add esp, 0x2c
lea eax, [ebp - 0xade8]
push 0xa0000000
push 0xffffffffffffffff
push eax
push ebx
call esi
push 0x42d830
push str.X_DREAMS_BASE_SERVER_NAME:__s_r_n
lea eax, [ebp - 0x86d4]
push 0x2711
push eax
call fcn.0040b0c0
add esp, 0x10
lea eax, [ebp - 0x86d4]
push 0xa0000000
push 0xffffffffffffffff
push eax
push ebx
call esi
push 0xa0000000
push 0xffffffffffffffff
push str.Content_Type:_application_x_www_form_urlencoded_r_n
push ebx
call esi
lea ecx, [ebp - 0x4fbc]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408150
sub ecx, edx
push ecx
push str.Content_Length:__d_r_n
lea eax, [ebp - 0xfc10]
push 0x2711
push eax
call fcn.0040b0c0
add esp, 0x10
lea eax, [ebp - 0xfc10]
push 0xa0000000
push 0xffffffffffffffff
push eax
push ebx
call esi
lea ecx, [ebp - 0x4fbc]
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408190
sub ecx, edx
push ecx
lea eax, [ebp - 0x4fbc]
push eax
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x40821a
push 0x4210d0
call fcn.0040a680
add esp, 4
push 0
lea eax, [ebp - 0x10c28]
push eax
lea eax, [ebp - 0x10c2c]
push eax
push 0x20000013
push ebx
mov dword [ebp - 0x10c28], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x4084cb
mov ecx, dword [ebp - 0x10c2c]
cmp ecx, 0x190
jb 0x40836c
lea eax, [ecx - 0x190]
cmp eax, 0x68
ja case.0x408213.402
movzx eax, byte [eax + 0x4086f0]
jmp dword [eax*4 + 0x4086c4]
call edi
test eax, eax
je 0x4081bd
call edi
push eax
lea eax, [ebp - 0x2fb4]
push 0x421114
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
add esp, 0x10
lea eax, [ebp - 0x10c2e]
push 0x426024
push eax
mov byte [ebp - 0x10c2e], 0
call fcn.0040d35c
push 0xffffffffffffffff
push 0x421080
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
add esp, 0x1c
xor al, al
jmp 0x4086a5
push str.HTTP_Error_400:
call fcn.0040a680
add esp, 4
jmp 0x40833e
push str.HTTP_Error_401:
call fcn.0040a680
add esp, 4
jmp 0x40833e
push str.HTTP_Error_403:
call fcn.0040a680
add esp, 4
jmp 0x40833e
push str.HTTP_Error_404:_Web
call fcn.0040a680
add esp, 4
jmp 0x40833e
push str.HTTP_Error_405:
call fcn.0040a680
add esp, 4
jmp 0x40833e
push str.HTTP_Error_408:
call fcn.0040a680
add esp, 4
jmp 0x40833e
push str.HTTP_Error_500:
call fcn.0040a680
add esp, 4
jmp 0x40833e
push str.HTTP_Error_501:
call fcn.0040a680
add esp, 4
jmp 0x40833e
push str.HTTP_Error_502:
call fcn.0040a680
add esp, 4
jmp 0x40833e
push str.HTTP_Error_504:
call fcn.0040a680
add esp, 4
jmp 0x40833e
push ecx
lea eax, [ebp - 0x43c]
push 0x4213d0
push eax
call fcn.0040b03e
lea eax, [ebp - 0x43c]
push eax
call fcn.0040a680
add esp, 0x10
push 0x401
lea eax, [ebp - 0x43c]
push 0
push eax
call fcn.0040b2e0
add esp, 0xc
lea eax, [ebp - 0x10c30]
push 0x426024
push eax
mov byte [ebp - 0x10c30], 0
call fcn.0040d35c
cmp ecx, 0xc8
jne 0x4083b0
push 0x2774
lea eax, [ebp - 0x2fb4]
push 0
push eax
call fcn.0040b2e0
push 0xc8
lea eax, [ebp - 0x2fb4]
push 0x4213f8
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
add esp, 0x1c
lea esp, [esp]
lea eax, [ebp - 0x10c24]
push eax
push 0x1001
lea eax, [ebp - 0x10c14]
push eax
push ebx
mov dword [ebp - 0x10c24], 0
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x408437
call edi
push eax
lea eax, [ebp - 0x43c]
push str.HTTP
push eax
call fcn.0040b03e
lea eax, [ebp - 0x43c]
push eax
call fcn.0040a680
push 0x401
lea eax, [ebp - 0x43c]
push 0
push eax
call fcn.0040b2e0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x1c
push ebx
call esi
push dword [ebp - 0x10c40]
call esi
push 0x426024
lea eax, [ebp - 0x10c32]
push eax
mov byte [ebp - 0x10c32], 0
call fcn.0040d35c
mov eax, dword [ebp - 0x10c24]
test eax, eax
jne 0x408453
push 0x42146c
call fcn.0040d2b0
add esp, 4
jmp 0x40853d
cmp eax, 0x1001
jae 0x4084c6
mov byte [ebp + eax - 0x10c14], 0
lea eax, [ebp - 0x10c14]
push eax
push str.HTTPS_POST
call fcn.0040d2b0
lea edx, [ebp - 0x10c14]
add esp, 8
mov esi, edx
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x408480
lea edi, [ebp - 0x3fb8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x408490
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x3fb8]
push eax
mov ecx, edx
and ecx, 3
push 0x4202bc
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0040b03e
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0xc
jmp 0x4083b0
call fcn.0040b74d
call edi
push eax
lea eax, [ebp - 0x43c]
push 0x421418
push eax
call fcn.0040b03e
lea eax, [ebp - 0x43c]
push eax
call fcn.0040a680
push 0x401
lea eax, [ebp - 0x43c]
push 0
push eax
call fcn.0040b2e0
add esp, 0x1c
lea eax, [ebp - 0x10c33]
push 0x426024
push eax
mov byte [ebp - 0x10c33], 0
call fcn.0040d35c
mov al, byte [ebp - 0x10c39]
mov byte [ebp - 0x10c2d], al
mov eax, 0x40852b
ret
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push dword [ebp - 0x10c44]
call esi
push dword [ebp - 0x10c40]
call esi
cmp byte [ebp - 0x10c2d], 0
je 0x407c27
lea esi, [ebp - 0x3fb8]
lea ecx, [esi + 1]
lea esp, [esp]
mov al, byte [esi]
inc esi
test al, al
jne 0x408570
sub esi, ecx
xor ecx, ecx
test esi, esi
je 0x4085b8
nop
movzx eax, byte [ebp + ecx - 0x3fb8]
cmp al, 0x3d
jne 0x4085aa
xor eax, eax
jmp 0x4085af
sbb eax, eax
or eax, 1
test eax, eax
je 0x4085b8
inc ecx
cmp ecx, esi
jb 0x408580
xor eax, eax
test esi, esi
je 0x4085cf
mov edi, edi
cmp byte [ebp + eax - 0x3fb8], 0x26
je 0x4085cf
inc eax
cmp eax, esi
jb 0x4085c0
sub eax, ecx
dec eax
push eax
lea eax, [ebp - 0x3fb7]
add eax, ecx
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.0040d7d0
lea eax, [ebp - 0x38]
push eax
call fcn.0040c58b
mov ebx, eax
add esp, 0x10
xor eax, eax
xor edi, edi
test esi, esi
je 0x408615
jmp 0x408600
cmp byte [ebp + edi - 0x3fb8], 0x3d
jne 0x408610
inc eax
cmp eax, 2
je 0x408615
inc edi
cmp edi, esi
jb 0x408600
push 0x1001
lea eax, [ebp - 0x5fc0]
push 0
push eax
call fcn.0040b2e0
lea eax, [ebp - 0x3fb7]
add eax, edi
push ebx
push eax
lea eax, [ebp - 0x5fc0]
push eax
call fcn.0040d7d0
lea eax, [ebp - 0x10c28]
push eax
push ebx
push dword [ebp - 0x10c48]
lea eax, [ebp - 0x5fc0]
push eax
call fcn.00401df0
lea eax, [ebp - 0x5fc0]
push eax
lea eax, [ebp - 0x2fb4]
push 0x4214cc
push eax
call fcn.0040b03e
lea eax, [ebp - 0x2fb4]
push eax
call fcn.0040a680
push 0x2774
lea eax, [ebp - 0x2fb4]
push 0
push eax
call fcn.0040b2e0
add esp, 0x44
push str.___HTTPS
call fcn.0040a680
mov al, byte [ebp - 0x10c2d]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040b2c3
mov esp, ebp
pop ebp
ret