Function at 0x40c590
Capabilities:
Get common file path
Get startup folder
Initialize winhttp library
Prepare http request
Read .ini file
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c6391
mov eax, dword fs:[0]
push eax
sub esp, 0x290
mov eax, dword [0x4fa534]
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 esi, ecx
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x29c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x298], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x40c5ec
push eax
call edi
mov dword [esi + 0x10], 0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40c5fd
push eax
call edi
mov dword [esi + 0xc], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x40c60e
push eax
call edi
mov dword [esi + 8], 0
push 0
push 0
push 0
push 0
push 0x4e920c
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [esi + 8], eax
test eax, eax
jne 0x40c639
mov dword [esi + 0x80], 1
xor al, al
jmp 0x40cadd
push dword [esi + 0x1c]
push dword [esi + 0x18]
push dword [esi + 0x14]
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
xor eax, eax
mov dword [ebp - 0x278], 0
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x264], 7
mov word [ebp - 0x278], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
lea eax, [ebp - 0x294]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x248]
mov ecx, ebx
push eax
lea edx, [ebp - 0x278]
call fcn.00405600
mov ecx, dword [ebp - 0x294]
mov eax, 0x1bb
add esp, 8
cmp cx, ax
jne 0x40c6c8
mov byte [esi + 4], 1
cmp dword [ebp - 0x264], 8
lea eax, [ebp - 0x278]
push 0
cmovae eax, dword [ebp - 0x278]
push ecx
push eax
push dword [esi + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, eax
mov dword [esi + 0xc], edi
test edi, edi
jne 0x40c704
mov eax, 2
xor bl, bl
mov dword [esi + 0x80], eax
jmp 0x40ca42
xor edx, edx
lea ecx, [ebp - 0x248]
cmp byte [esi + 4], dl
mov eax, 0x800000
mov ebx, 0x4e8e58
cmovne edx, eax
cmp dword [ebp - 0x234], 8
push edx
cmovae ecx, dword [ebp - 0x248]
mov eax, 0x4e8e50
cmp dword [ebp + 0xc], 0
push 0
push 0
push 0
push ecx
cmovne eax, ebx
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [esi + 0x10], eax
test eax, eax
jne 0x40c75f
mov eax, 1
xor bl, bl
mov dword [esi + 0x80], eax
jmp 0x40ca42
cmp byte [esi + 4], 0
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
je 0x40c783
push 4
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x294], 0x3301
push ecx
push 0x1f
push eax
call edi
xor eax, eax
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c7d0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.004053d0
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x40c83b
lea ecx, [eax - 1]
cmp eax, ecx
jbe 0x40cafb
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
movzx eax, word [eax + ecx*2]
cmp eax, 0x5c
je 0x40c83b
cmp eax, 0x2f
je 0x40c83b
push 0xe
push 0x4e9380
lea ecx, [ebp - 0x230]
call fcn.00405fe0
push 0x13
push str.configmgtvConf.ini
lea ecx, [ebp - 0x230]
call fcn.00405fe0
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
push 0
push str.InterceptedPacket
push str.DataConfig
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, 1
jne 0x40c8a7
push 0xc
lea eax, [ebp - 0x254]
mov dword [ebp - 0x254], 3
push eax
push 0x26
push dword [esi + 0x10]
mov dword [ebp - 0x250], str.127.0.0.1:8888
mov dword [ebp - 0x24c], 0
call edi
cmp byte [ebp + 0x1c], 0
je 0x40c8ed
push dword [ebp - 0x298]
mov ecx, esi
push dword [ebp - 0x29c]
call fcn.0040cb10
test al, al
je 0x40c9d4
push 0
push dword [esi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40c9e3
mov eax, 1
xor bl, bl
mov dword [esi + 0x80], eax
jmp 0x40c9e5
lea eax, [ebp - 0x290]
push eax
lea ecx, [esi + 0x20]
call fcn.0040e8e0
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x260]
call fcn.00406250
mov edx, dword [ebp - 0x27c]
cmp edx, 0x10
jb 0x40c947
mov ecx, dword [ebp - 0x290]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40c93d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb00
push edx
push ecx
call fcn.0043c464
add esp, 8
cmp dword [ebp - 0x24c], 8
lea eax, [ebp - 0x260]
push 0xa0000000
push dword [ebp - 0x250]
cmovae eax, dword [ebp - 0x260]
push eax
push dword [esi + 0x10]
mov dword [ebp - 0x280], 0
mov dword [ebp - 0x27c], 0xf
mov byte [ebp - 0x290], 0
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov edx, dword [ebp - 0x24c]
test eax, eax
setne bl
cmp edx, 8
jb 0x40c9d0
mov ecx, dword [ebp - 0x260]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c9c6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb00
push edx
push ecx
call fcn.0043c464
add esp, 8
test bl, bl
jne 0x40c9e3
mov eax, 3
xor bl, bl
mov dword [esi + 0x80], eax
jmp 0x40c9e5
mov bl, 1
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40ca25
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ca1b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb05
push edx
push ecx
call fcn.0043c464
add esp, 8
xor eax, eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
mov edx, dword [ebp - 0x234]
cmp edx, 8
jb 0x40ca82
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ca78
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb05
push edx
push ecx
call fcn.0043c464
add esp, 8
mov edx, dword [ebp - 0x264]
xor eax, eax
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
cmp edx, 8
jb 0x40cadb
mov ecx, dword [ebp - 0x278]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cad1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cb05
push edx
push ecx
call fcn.0043c464
add esp, 8
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.0043c480
mov esp, ebp
pop ebp
ret 0x18
call fcn.00405280
call fcn.00470977
call fcn.00470977
int3