Function at 0x40c740
Capabilities:
Connect to http server
Create http request
Delete file
Query remote server for available data
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x714
mov eax, dword [0x5b107c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
mov edx, dword [eax + 0x60]
push esi
push edi
push 6
mov ecx, ebx
mov dword [ebp - 0x710], ebx
call edx
mov edi, eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x60]
push 7
mov ecx, ebx
mov dword [ebp - 0x714], edi
call edx
mov dword [ebp - 0x700], eax
call fcn.00422bf0
mov edi, dword [ebp - 0x700]
mov esi, eax
mov dword [ebp - 0x704], esi
call fcn.00422bf0
mov ecx, dword [0x67cc98]
mov edi, eax
mov dword [ebp - 0x70c], edi
call fcn.00575150
mov dword [ebp - 0x708], eax
test eax, eax
je 0x40c7e3
jmp 0x40c7c0
mov ecx, dword [0x67cc98]
lea eax, [ebp - 0x708]
push eax
call fcn.00574b80
mov eax, dword [eax]
cmp dword [eax + 8], 1
je 0x40c814
cmp dword [ebp - 0x708], 0
jne 0x40c7c0
mov dword [ebp - 0x6f8], 0
mov ecx, 0x5861b8
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c81c
test dl, dl
je 0x40c810
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c81c
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c7f4
xor eax, eax
jmp 0x40c821
mov dword [ebp - 0x6f8], eax
jmp 0x40c7ed
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40ce71
mov ecx, 0x5861b8
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c850
test dl, dl
je 0x40c84c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c850
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c830
xor eax, eax
jmp 0x40c855
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40ce71
lea ecx, [ebp - 0x53a]
call fcn.00419430
mov ebx, dword [ebp - 0x704]
mov esi, 0x11
mov ecx, ebx
lea edi, [ebp - 0x56d]
mov dword [ebp - 0x57b], 0x1f50206
call fcn.0052ccd0
mov ecx, dword [ebp - 0x70c]
lea edi, [ebp - 0x55c]
call fcn.0052ccd0
mov ecx, str.1111
lea edi, [ebp - 0x54b]
call fcn.0052ccd0
mov esi, 0x10
mov ecx, str.DARKSTORY00002
lea edi, [ebp - 0x528]
call fcn.0052ccd0
mov ecx, str._AVCGameState_.
lea edi, [ebp - 0x518]
call fcn.0052ccd0
mov esi, 0x11
mov ecx, ebx
mov edi, 0x682584
call fcn.0052ccd0
mov ecx, dword [ebp - 0x70c]
mov edi, 0x682595
call fcn.0052ccd0
mov ecx, dword [ebp - 0x6f8]
mov eax, dword [ecx]
mov edx, dword [eax + 0x60]
push 0x2c6
call edx
cmp dword [eax + 0x2d8], 0
mov esi, dword [sym.imp.MSVCR100.dll_sprintf]
je 0x40c93c
push ebx
push 0x67ccb0
mov dword [0x67cd14], 1
call esi
mov eax, dword [ebp - 0x70c]
push eax
push 0x67cce2
call esi
add esp, 0x10
call fcn.0043b3b0
jmp 0x40c96c
push 0x5861b8
push 0x67ccb0
mov dword [0x67cd14], 0
call esi
push 0x5861b8
push 0x67cce2
call esi
add esp, 0x10
push str.._Data_UserCfgInfo.dat
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, 9
call fcn.0043ae30
mov ecx, dword [eax + 0x36c]
mov dword [0x64f5c4], ecx
call fcn.004c9ea0
mov al, byte [0x64f5c4]
mov byte [ebp - 0x508], al
cmp al, 3
jne 0x40cd9e
xor edi, edi
push 0x3ff
lea edx, [ebp - 0x503]
push edi
push edx
mov dword [ebp - 0x708], edi
mov byte [ebp - 0x504], 0
call sub.MSVCR100.dll_memset
push 0xff
lea eax, [ebp - 0x103]
push edi
push eax
mov byte [ebp - 0x104], 0
call sub.MSVCR100.dll_memset
add esp, 0x18
push edi
push edi
push edi
push edi
push str.BUDDY
mov dword [ebp - 0x6f8], edi
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x6fc], eax
cmp eax, edi
jne 0x40cab8
push 0xff
lea ecx, [ebp - 0x67f]
push edi
push ecx
mov byte [ebp - 0x680], 0
call sub.MSVCR100.dll_memset
mov eax, dword [0x680874]
add esp, 0xc
cmp eax, edi
jne 0x40ca24
mov eax, 0x6815d0
push eax
lea edx, [ebp - 0x680]
push str._s__004_
push edx
call esi
lea eax, [ebp - 0x680]
push eax
push 1
push 0xfcf
push 0x67cc80
call fcn.0043af90
add esp, 0x1c
mov edi, 1
mov esi, 0x67cc80
mov ebx, eax
call fcn.0043adf0
mov esi, eax
test esi, esi
je 0x40cf40
test ebx, ebx
je 0x40cf40
mov edi, dword [ebx]
call fcn.004019d0
movzx ecx, word [esi + 0x20a]
mov dword [ebp - 0x700], ecx
fild dword [ebp - 0x700]
faddp st(1)
call fcn.00577600
push eax
mov eax, esi
call fcn.004019c0
call fcn.00577600
mov edx, dword [edi + 0x24]
push eax
mov ecx, ebx
call edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005762ee
mov esp, ebp
pop ebp
ret
push edi
push edi
push 3
push 0x5861b8
push 0x5861b8
push edi
push str.www.google.com
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ebx, eax
test ebx, ebx
jne 0x40cb9a
push 0xff
push eax
mov byte [ebp - 0x680], al
lea eax, [ebp - 0x67f]
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [0x680874]
add esp, 0xc
test eax, eax
jne 0x40cb06
mov eax, 0x6815d0
push eax
lea ecx, [ebp - 0x680]
push str._s__005_
push ecx
call esi
lea edx, [ebp - 0x680]
push edx
push 1
push 0xfcf
push 0x67cc80
call fcn.0043af90
add esp, 0x1c
mov edi, 1
mov esi, 0x67cc80
mov ebx, eax
call fcn.0043adf0
mov esi, eax
test esi, esi
je 0x40cf40
test ebx, ebx
je 0x40cf40
mov edi, dword [ebx]
call fcn.004019d0
movzx eax, word [esi + 0x20a]
mov dword [ebp - 0x700], eax
fild dword [ebp - 0x700]
faddp st(1)
call fcn.00577600
push eax
mov eax, esi
call fcn.004019c0
call fcn.00577600
mov edx, dword [edi + 0x24]
push eax
mov ecx, ebx
call edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005762ee
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x55c]
push eax
lea ecx, [ebp - 0x56d]
push ecx
lea edx, [ebp - 0x104]
push str.Auth_AuthUsrInfoChk.aspx_USRID_sUSRPWD_s
push edx
call esi
add esp, 0x10
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x104]
push eax
push str.POST
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
push 0
push 0
push 0
mov edi, eax
push 0
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
push 0
push 0
lea ecx, [ebp - 0x6f8]
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
mov eax, dword [ebp - 0x6f8]
lea edx, [ebp - 0x708]
push edx
push eax
lea ecx, [ebp - 0x504]
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call edi
mov edx, dword [ebp - 0x6fc]
push edx
call edi
cmp byte [ebp - 0x504], 0x30
je 0x40ccf3
push 0xff
lea eax, [ebp - 0x67f]
push 0
push eax
mov byte [ebp - 0x680], 0
call sub.MSVCR100.dll_memset
mov eax, dword [0x680874]
add esp, 0xc
test eax, eax
jne 0x40cc5f
mov eax, 0x6815d0
push eax
lea ecx, [ebp - 0x680]
push str._s__001_
push ecx
call esi
lea edx, [ebp - 0x680]
push edx
push 1
push 0xfcf
push 0x67cc80
call fcn.0043af90
add esp, 0x1c
mov edi, 1
mov esi, 0x67cc80
mov ebx, eax
call fcn.0043adf0
mov esi, eax
test esi, esi
je 0x40cf40
test ebx, ebx
je 0x40cf40
mov edi, dword [ebx]
call fcn.004019d0
movzx eax, word [esi + 0x20a]
mov dword [ebp - 0x6fc], eax
fild dword [ebp - 0x6fc]
faddp st(1)
call fcn.00577600
push eax
mov eax, esi
call fcn.004019c0
call fcn.00577600
mov edx, dword [edi + 0x24]
push eax
mov ecx, ebx
call edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005762ee
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x704]
mov esi, 0x11
lea edi, [ebp - 0x6e5]
mov dword [ebp - 0x6f3], 0x2620206
call fcn.0052ccd0
mov ecx, dword [ebp - 0x70c]
lea edi, [ebp - 0x6d4]
call fcn.0052ccd0
mov esi, 0x10
mov ecx, str.DARKSTORY00002
lea edi, [ebp - 0x6a0]
call fcn.0052ccd0
mov ecx, str._AVCGameState_.
lea edi, [ebp - 0x690]
call fcn.0052ccd0
lea eax, [ebp - 0x504]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cd52
sub eax, edx
lea esi, [eax + 1]
lea ecx, [ebp - 0x504]
lea edi, [ebp - 0x67f]
call fcn.0052ccd0
mov dl, byte [0x64f5c4]
mov eax, dword [0x65fb64]
mov edi, 0x175
lea esi, [ebp - 0x6f4]
mov byte [ebp - 0x680], dl
mov dword [ebp - 0x6e9], eax
call fcn.0052c2f0
mov ebx, dword [ebp - 0x704]
jmp 0x40cdba
mov ecx, dword [0x65fb64]
mov edi, 0x75
lea esi, [ebp - 0x57c]
mov dword [ebp - 0x571], ecx
call fcn.0052c2f0
mov esi, 0x11
mov ecx, ebx
mov edi, 0x65c88c
call fcn.0052ccd0
mov eax, dword [0x67f34c]
test eax, eax
jne 0x40cdd9
mov eax, 0x6815d0
push eax
push 3
push 0xfd6
push 0x67cc80
call fcn.0043af90
add esp, 0x10
mov edi, 1
mov esi, 0x67cc80
mov ebx, eax
call fcn.0043adf0
mov esi, eax
test esi, esi
je 0x40ce3f
test ebx, ebx
je 0x40ce3f
mov edi, dword [ebx]
call fcn.004019d0
movzx edx, word [esi + 0x20a]
mov dword [ebp - 0x6fc], edx
fild dword [ebp - 0x6fc]
faddp st(1)
call fcn.00577600
push eax
mov eax, esi
call fcn.004019c0
call fcn.00577600
push eax
mov eax, dword [edi + 0x24]
mov ecx, ebx
call eax
mov ecx, dword [0x65fab8]
mov eax, dword [ebp - 0x704]
mov edx, 0x65682c
mov dword [0x65fb98], ecx
mov dword [0x65fb9c], 1
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x40ce62
jmp 0x40cf11
mov eax, dword [0x67f468]
test eax, eax
jne 0x40ce7f
mov eax, 0x6815d0
push eax
push 1
push 0xfb9
push 0x67cc80
call fcn.0043af90
mov ecx, dword [0x67cc98]
add esp, 0x10
mov edi, eax
call fcn.00575150
mov dword [ebp - 0x6f8], eax
test eax, eax
je 0x40cf17
jmp 0x40ceb0
mov ecx, dword [0x67cc98]
lea edx, [ebp - 0x6f8]
push edx
call fcn.00574b80
mov esi, dword [eax]
cmp dword [esi + 8], 1
je 0x40ced5
cmp dword [ebp - 0x6f8], 0
jne 0x40ceb0
jmp 0x40cf17
test edi, edi
je 0x40cf17
mov ebx, dword [edi]
mov eax, esi
call fcn.004019d0
movzx eax, word [esi + 0x20a]
mov dword [ebp - 0x6fc], eax
fild dword [ebp - 0x6fc]
faddp st(1)
call fcn.00577600
push eax
mov eax, esi
call fcn.004019c0
call fcn.00577600
mov edx, dword [ebx + 0x24]
push eax
mov ecx, edi
call edx
mov ebx, dword [ebp - 0x710]
mov ecx, dword [ebp - 0x714]
mov eax, dword [ecx]
mov edx, dword [eax + 0x3c]
push 0
call edx
mov ecx, dword [ebp - 0x700]
mov eax, dword [ecx]
mov edx, dword [eax + 0x3c]
push 0
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
push 1
mov ecx, ebx
call edx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005762ee
mov esp, ebp
pop ebp
ret