Function at 0x409cd0
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 0x46b5e1
mov eax, dword fs:[0]
push eax
sub esp, 0x290
mov eax, dword [0x48f244]
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 0x409d2c
push eax
call edi
mov dword [esi + 0x10], 0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x409d3d
push eax
call edi
mov dword [esi + 0xc], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x409d4e
push eax
call edi
mov dword [esi + 8], 0
push 0
push 0
push 0
push 0
push 0x4838a8
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [esi + 8], eax
test eax, eax
jne 0x409d79
mov dword [esi + 0x80], 1
xor al, al
jmp 0x40a21d
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.00404b60
mov ecx, dword [ebp - 0x294]
mov eax, 0x1bb
add esp, 8
cmp cx, ax
jne 0x409e08
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 0x409e44
mov eax, 2
xor bl, bl
mov dword [esi + 0x80], eax
jmp 0x40a182
xor edx, edx
lea ecx, [ebp - 0x248]
cmp byte [esi + 4], dl
mov eax, 0x800000
mov ebx, str.POST
cmovne edx, eax
cmp dword [ebp - 0x234], 8
push edx
cmovae ecx, dword [ebp - 0x248]
mov eax, 0x483848
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 0x409e9f
mov eax, 1
xor bl, bl
mov dword [esi + 0x80], eax
jmp 0x40a182
cmp byte [esi + 4], 0
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
je 0x409ec3
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 0x409f10
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.004049f0
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x409f7b
lea ecx, [eax - 1]
cmp eax, ecx
jbe 0x40a23b
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
movzx eax, word [eax + ecx*2]
cmp eax, 0x5c
je 0x409f7b
cmp eax, 0x2f
je 0x409f7b
push 0xe
push 0x483a18
lea ecx, [ebp - 0x230]
call fcn.00405100
push 0x13
push str.configmgtvConf.ini
lea ecx, [ebp - 0x230]
call fcn.00405100
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 0x409fe7
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 0x40a02d
push dword [ebp - 0x298]
mov ecx, esi
push dword [ebp - 0x29c]
call fcn.0040a250
test al, al
je 0x40a114
push 0
push dword [esi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40a123
mov eax, 1
xor bl, bl
mov dword [esi + 0x80], eax
jmp 0x40a125
lea eax, [ebp - 0x290]
push eax
lea ecx, [esi + 0x20]
call fcn.0040b240
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x260]
call fcn.00405280
mov edx, dword [ebp - 0x27c]
cmp edx, 0x10
jb 0x40a087
mov ecx, dword [ebp - 0x290]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40a07d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a240
push edx
push ecx
call fcn.00439095
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 0x40a110
mov ecx, dword [ebp - 0x260]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a106
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a240
push edx
push ecx
call fcn.00439095
add esp, 8
test bl, bl
jne 0x40a123
mov eax, 3
xor bl, bl
mov dword [esi + 0x80], eax
jmp 0x40a125
mov bl, 1
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40a165
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a15b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a245
push edx
push ecx
call fcn.00439095
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 0x40a1c2
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a1b8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a245
push edx
push ecx
call fcn.00439095
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 0x40a21b
mov ecx, dword [ebp - 0x278]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a211
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a245
push edx
push ecx
call fcn.00439095
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.004390b1
mov esp, ebp
pop ebp
ret 0x18
call fcn.004049e0
call fcn.004480ba
call fcn.004480ba
int3