Function at 0x516100
Capabilities:
Create http request
Delete file
Read data from internet
Receive data
Resume thread
Send data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x590858
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x598
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], esi
mov eax, dword [esi + 0x254]
test eax, eax
jne 0x51619f
mov eax, dword [esi + 0x88]
test eax, eax
je 0x51614f
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 0x10]
push 0
push 0
push 0
push 0
jmp 0x516180
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x516170
mov edi, dword [esi + 0x90]
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 0x10]
push 0
push 0
push edi
push 3
jmp 0x516180
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 0x10]
push 0
push 0
push 0
push 1
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esi + 0x22c], eax
je 0x5161bb
mov eax, dword [esi + 0x238]
test eax, eax
jne 0x516357
mov ecx, dword [esi + 0x22c]
mov edi, dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push 0x516a90
push ecx
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x5161df
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfb6
mov ecx, esi
call fcn.00515d80
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x238]
test ecx, ecx
je 0x516200
test eax, eax
je 0x516357
mov edx, dword [esi + 0x22c]
push eax
push edx
call edi
jmp 0x516357
mov eax, dword [esi + 0x254]
test eax, eax
jne 0x51637b
push 0
push 4
push 0
push 0
push esi
push 0x516050
call sub.MFC42.DLL_AfxBeginThread
mov edi, eax
test edi, edi
jne 0x516262
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x516244
mov ecx, dword [esi + 0x22c]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push edi
push 0xfd2
mov ecx, esi
call fcn.00515d80
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x2c]
mov dword [edi + 0x28], 0
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [esi + 0xa4]
mov ecx, dword [edi + 0x2c]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push eax
push ecx
call ebx
cmp eax, 0x102
jne 0x5162ec
mov edx, dword [esi + 0x22c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 0x22c], 0
mov eax, dword [edi + 0x2c]
push 0xffffffffffffffff
push eax
call ebx
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx + 4]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x5162ca
mov ecx, dword [esi + 0x22c]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push 0x5b4
push 0xfb7
mov ecx, esi
call fcn.00515d80
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx + 4]
mov eax, dword [esi + 0x230]
test eax, eax
jne 0x516338
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x516314
push eax
mov eax, dword [esi + 0x22c]
push eax
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
mov ecx, dword [esi + 0x258]
push ecx
push 0xfb7
mov ecx, esi
call fcn.00515d80
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x238]
test eax, eax
je 0x51637b
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x516357
mov edx, dword [esi + 0x22c]
push eax
push edx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
mov eax, dword [esi + 0x20]
push 0
push 0
push 0x8001
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.00515d10
push 0xfb4
mov ecx, esi
call fcn.00515ac0
mov eax, dword [esi + 0x60]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x28], ebx
je 0x5163d8
mov eax, dword [esi + 0x68]
mov edx, dword [esi + 0x230]
push esi
lea ecx, [ebp - 0x1a4]
push 0x84000000
push ecx
push eax
push edx
call dword [sym.imp.WININET.dll_FtpFindFirstFileA]
cmp eax, ebx
je 0x5163f1
mov ecx, dword [ebp - 0x184]
push eax
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x20], ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x5163f1
mov edx, dword [esi + 0x240]
lea ecx, [esi + 0x240]
mov dword [ebp - 0x28], 1
call dword [edx + 0x38]
mov dword [ebp - 0x20], eax
cmp dword [esi + 0x238], ebx
je 0x516430
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x51640e
push eax
mov eax, dword [esi + 0x22c]
push eax
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
mov ecx, dword [esi + 0x20]
push ebx
push ebx
push 0x8001
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x60], ebx
jne 0x5164b3
cmp dword [esi + 0x80], ebx
je 0x5164b3
mov eax, dword [esi + 0x68]
push esi
lea edx, [ebp - 0x1a4]
push 0x84000000
push edx
push eax
mov eax, dword [esi + 0x230]
push eax
call dword [sym.imp.WININET.dll_FtpFindFirstFileA]
cmp eax, ebx
je 0x5164b3
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [esi + 0x20]
push ebx
push ebx
push 0x8002
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, ebx
jne 0x5164b3
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x516490
mov edx, dword [esi + 0x22c]
push eax
push edx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
mov eax, dword [esi + 0x20]
push ebx
push 1
push 0x8001
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x238], ebx
je 0x5164f2
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x5164d0
mov ecx, dword [esi + 0x22c]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
mov edx, dword [esi + 0x20]
push ebx
push ebx
push 0x8001
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esi + 0xa0]
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x51653b
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
call fcn.00515ec0
test eax, eax
jne 0x51653b
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x51652b
mov ecx, dword [esi + 0x22c]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
lea edx, [ebp - 0x18]
mov ecx, esi
push edx
call fcn.00515d30
jmp 0x516605
mov eax, dword [esi + 0x60]
cmp eax, ebx
mov eax, dword [esi + 0x7c]
je 0x51656d
cmp eax, ebx
mov eax, dword [esi + 0x68]
push esi
je 0x516559
push 0x84000002
push bind
jmp 0x516593
mov ecx, dword [esi + 0x230]
push 0x84000001
push bind
push eax
push ecx
jmp 0x51659b
cmp eax, ebx
mov eax, dword [esi + 0x68]
push esi
je 0x516589
mov edx, dword [esi + 0x230]
push 0x84000002
push 0x40000000
push eax
push edx
jmp 0x51659b
push 0x84000001
push 0x40000000
push eax
mov eax, dword [esi + 0x230]
push eax
call dword [sym.imp.WININET.dll_FtpOpenFileA]
cmp eax, ebx
mov dword [esi + 0x234], eax
jne 0x5165d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x5165c8
mov ecx, dword [esi + 0x22c]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push edi
push 0xfb3
mov ecx, esi
call fcn.00515d80
jmp 0x516605
cmp dword [esi + 0x238], ebx
je 0x516625
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x5165f4
mov edx, dword [esi + 0x22c]
push eax
push edx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
mov eax, dword [esi + 0x20]
push ebx
push ebx
push 0x8001
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x60], ebx
je 0x516631
push 0xfbc
jmp 0x516636
push 0xfc2
mov ecx, esi
call fcn.00515ac0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x60]
test eax, eax
je 0x5167b5
lea ecx, [ebp - 0x1c]
mov eax, 0x400
push ecx
push eax
mov eax, dword [esi + 0x234]
lea edx, [ebp - 0x5a4]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x5166b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x5166a5
mov ecx, dword [esi + 0x22c]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push edi
push 0xfba
mov ecx, esi
call fcn.00515d80
jmp 0x516605
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x5168e0
mov eax, dword [esi + 0x238]
test eax, eax
jne 0x5168cb
mov eax, dword [ebp - 0x1c]
mov edx, dword [esi + 0x240]
lea ecx, [esi + 0x240]
push eax
lea eax, [ebp - 0x5a4]
mov byte [ebp - 4], 1
push eax
call dword [edx + 0x40]
fld qword [esi + 0x98]
fcomp qword [0x59f020]
mov dword [ebp - 4], 0
fnstsw ax
test ah, 0x41
jne 0x516755
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x58], eax
fild qword [ebp - 0x44]
fild qword [ebp - 0x5c]
fdiv st(1)
fcom qword [esi + 0x98]
fnstsw ax
test ah, 0x41
jne 0x516751
fld st(1)
fmul st(1)
fdiv qword [esi + 0x98]
fsub st(2)
call sub.MSVCRT.dll__ftol
fstp st(0)
push eax
fstp st(0)
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x516755
fstp st(0)
fstp st(0)
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x28]
add ebx, eax
push ecx
lea eax, [ebp - 0x38]
push edx
lea ecx, [ebp - 0x30]
push eax
push ecx
lea edx, [ebp - 0x3c]
push ebx
push edx
push edi
mov ecx, esi
call fcn.00516960
jmp 0x5168cb
mov eax, dword [esi + 0x240]
lea ecx, [esi + 0x240]
lea edx, [ebp - 0x5a4]
push 0x400
push edx
mov byte [ebp - 4], 3
call dword [eax + 0x3c]
test eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], 0
je 0x5168e0
lea ecx, [ebp - 0x34]
lea edx, [ebp - 0x5a4]
push ecx
push eax
mov eax, dword [esi + 0x234]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
jne 0x516832
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x516820
mov ecx, dword [esi + 0x22c]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push edi
push 0xfc4
mov ecx, esi
call fcn.00515d80
jmp 0x516605
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x516868
mov ecx, dword [esi + 0x238]
test ecx, ecx
jne 0x516868
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x20]
add ecx, eax
mov eax, dword [ebp - 0x28]
push edx
push eax
lea edx, [ebp - 0x38]
lea eax, [ebp - 0x30]
push edx
push eax
mov dword [ebp - 0x2c], ecx
push ecx
lea ecx, [ebp - 0x3c]
push ecx
push edi
mov ecx, esi
call fcn.00516960
fld qword [esi + 0x98]
fcomp qword [0x59f020]
fnstsw ax
test ah, 0x41
jne 0x5168cb
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [ebp - 0x2c]
sub eax, edi
mov dword [ebp - 0x4c], eax
xor eax, eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x54], edx
fild qword [ebp - 0x4c]
mov dword [ebp - 0x50], eax
fild qword [ebp - 0x54]
fdiv st(1)
fcom qword [esi + 0x98]
fnstsw ax
test ah, 0x41
jne 0x5168c7
fld st(1)
fmul st(1)
fdiv qword [esi + 0x98]
fsub st(2)
call sub.MSVCRT.dll__ftol
fstp st(0)
push eax
fstp st(0)
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x5168cb
fstp st(0)
fstp st(0)
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x5168e0
mov eax, dword [esi + 0x238]
test eax, eax
je 0x51665b
mov eax, dword [esi + 0x240]
lea ecx, [esi + 0x240]
call dword [eax + 0x54]
mov eax, dword [esi + 0x238]
test eax, eax
je 0x51690a
mov eax, dword [esi + 0x60]
test eax, eax
je 0x51690a
mov eax, dword [esi + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esi + 0x20]
push 0
push 0
push 0x8001
push ecx
jmp 0x5165ff