Function at 0x405c80
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4601f1
mov eax, dword fs:[0]
push eax
sub esp, 0x570
mov eax, dword [0x47c824]
xor eax, ebp
mov dword [ebp - 0x18], 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 + 8]
xor esi, esi
cmp dword [0x481220], esi
mov dword [ebp - 0x550], eax
je 0x40620e
mov ecx, dword [0x481224]
cmp ecx, esi
je 0x40620e
mov ebx, 0x10
cmp dword [eax + 0x18], ebx
jb 0x405ce5
mov eax, dword [eax + 4]
jmp 0x405ce8
add eax, 4
push SysReAllocStringLen
push esi
push esi
push 1
push esi
push eax
push 1
call fcn.00423837
push esi
push esi
mov edi, eax
push esi
push esi
mov ecx, edi
mov dword [ebp - 0x564], edi
mov dword [ebp - 4], esi
call fcn.0042322f
push esi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [edi]
mov edx, dword [eax + 0x28]
push esi
push esi
mov ecx, edi
call edx
lea eax, [ebp - 0x56c]
push eax
mov ecx, edi
mov dword [ebp - 0x56c], esi
call fcn.004224ca
mov esi, dword [ebp - 0x56c]
cmp esi, 0xc8
jne 0x4061b6
xor esi, esi
mov dword [ebp - 0x54c], esi
mov dword [ebp - 0x548], esi
call fcn.0042386c
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x405d71
push 0x80004005
call fcn.00401cb0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x554], eax
push esi
lea ecx, [ebp - 0x554]
push ecx
push 5
mov ecx, edi
mov dword [ebp - 4], 2
call fcn.004233ab
mov edx, dword [ebp - 0x554]
push edx
call fcn.004437bc
mov edi, dword [ebp - 0x550]
cdq
add esp, 4
cmp dword [edi + 0x30], esi
mov dword [ebp - 0x54c], eax
mov dword [ebp - 0x548], edx
jbe 0x405fc2
push 0x400
lea eax, [ebp - 0x51c]
push esi
push eax
call fcn.00445a00
add esp, 0xc
cmp dword [edi + 0x4c], esi
jbe 0x405df6
cmp dword [edi + 0x50], ebx
jb 0x405dea
mov eax, dword [edi + 0x3c]
jmp 0x405ded
lea eax, [edi + 0x3c]
push eax
call fcn.00443d48
add esp, 4
lea ecx, [edi + 0x1c]
push ecx
add edi, 0x38
push edi
lea edi, [ebp - 0x538]
call fcn.00406750
add esp, 8
mov byte [ebp - 4], 3
cmp dword [ebp - 0x520], ebx
mov eax, dword [ebp - 0x534]
jae 0x405e24
lea eax, [ebp - 0x534]
push 0x1011
push eax
lea ecx, [ebp - 0x57c]
call fcn.00422227
xor edi, edi
mov byte [ebp - 4], 4
cmp dword [ebp - 0x548], edi
mov dword [ebp - 0x544], edi
mov dword [ebp - 0x540], edi
jb 0x405f7a
ja 0x405e61
cmp dword [ebp - 0x54c], edi
jbe 0x405f7a
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x400
lea edx, [ebp - 0x51c]
push 0
push edx
call fcn.00445a00
mov ecx, dword [ebp - 0x564]
mov eax, dword [ecx]
mov eax, dword [eax + 0x34]
add esp, 0xc
push 0x400
lea edx, [ebp - 0x51c]
push edx
call eax
mov esi, eax
test esi, esi
je 0x405f45
cmp esi, 0x400
ja 0x405f7a
xor eax, eax
mov ecx, esi
add ecx, dword [ebp - 0x544]
adc eax, dword [ebp - 0x540]
cmp eax, dword [ebp - 0x548]
jb 0x405ed8
ja 0x405ece
cmp ecx, dword [ebp - 0x54c]
jbe 0x405ed8
mov edx, dword [ebp - 0x54c]
sub edx, ecx
add esi, edx
add dword [ebp - 0x544], esi
mov eax, 0
adc dword [ebp - 0x540], eax
cmp esi, eax
je 0x405f54
mov ecx, dword [ebp - 0x550]
mov ecx, dword [ecx + 0x58]
cmp ecx, eax
je 0x405f30
lea edx, [ebp - 0x54c]
mov dword [ebp - 0x55c], eax
mov dword [ebp - 0x558], eax
mov dword [ebp - 0x560], edx
lea edx, [ebp - 0x560]
lea eax, [ebp - 0x544]
push edx
mov dword [ebp - 0x55c], esi
mov dword [ebp - 0x558], eax
call ecx
add esp, 4
push esi
lea eax, [ebp - 0x51c]
push eax
lea ecx, [ebp - 0x57c]
call fcn.004218b2
jmp 0x405f54
cmp edi, 5
jge 0x405f7a
push 0x3e8
add edi, 1
call ebx
mov ecx, dword [ebp - 0x548]
cmp dword [ebp - 0x540], ecx
jb 0x405e67
ja 0x405f7a
mov edx, dword [ebp - 0x54c]
cmp dword [ebp - 0x544], edx
jb 0x405e67
lea ecx, [ebp - 0x57c]
call fcn.00421998
lea ecx, [ebp - 0x57c]
call fcn.00421b27
mov ecx, dword [ebp - 0x550]
mov eax, dword [ecx + 0x54]
test eax, eax
je 0x405fa3
push ecx
call eax
add esp, 4
lea ecx, [ebp - 0x57c]
mov byte [ebp - 4], 3
call fcn.00421cf8
lea ecx, [ebp - 0x538]
call fcn.004014e0
jmp 0x406186
cmp edx, esi
mov dword [ebp - 0x544], esi
mov dword [ebp - 0x540], esi
ja 0x405fd9
cmp eax, 0x7fffffff
jbe 0x405fee
lea ecx, [ebp - 0x554]
call fcn.00406590
mov eax, 0xfffffffb
jmp 0x40621c
add eax, 1
push eax
call fcn.00420ee3
mov edi, eax
mov eax, dword [ebp - 0x54c]
add eax, 1
push eax
push 0
push edi
call fcn.00445a00
mov ecx, dword [ebp - 0x540]
add esp, 0x10
cmp ecx, dword [ebp - 0x548]
ja 0x406148
jb 0x406040
mov edx, dword [ebp - 0x544]
cmp edx, dword [ebp - 0x54c]
jae 0x406148
jmp 0x406040
push 0x400
lea eax, [ebp - 0x51c]
push 0
push eax
call fcn.00445a00
mov ecx, dword [ebp - 0x564]
mov edx, dword [ecx]
mov edx, dword [edx + 0x34]
add esp, 0xc
push 0x400
lea eax, [ebp - 0x51c]
push eax
call edx
mov esi, eax
test esi, esi
je 0x406148
cmp esi, 0x400
ja 0x406148
xor eax, eax
mov ecx, esi
add ecx, dword [ebp - 0x544]
adc eax, dword [ebp - 0x540]
cmp eax, dword [ebp - 0x548]
jb 0x4060b1
ja 0x4060a7
cmp ecx, dword [ebp - 0x54c]
jbe 0x4060b1
mov eax, dword [ebp - 0x54c]
sub eax, ecx
add esi, eax
test esi, esi
je 0x406113
mov ecx, dword [ebp - 0x550]
mov ecx, dword [ecx + 0x58]
test ecx, ecx
je 0x4060fa
xor eax, eax
lea edx, [ebp - 0x54c]
mov dword [ebp - 0x55c], eax
mov dword [ebp - 0x558], eax
mov dword [ebp - 0x560], edx
lea edx, [ebp - 0x560]
lea eax, [ebp - 0x544]
push edx
mov dword [ebp - 0x55c], esi
mov dword [ebp - 0x558], eax
call ecx
add esp, 4
mov ecx, dword [ebp - 0x544]
push esi
lea eax, [ebp - 0x51c]
push eax
add ecx, edi
push ecx
call fcn.00449d00
add esp, 0xc
add dword [ebp - 0x544], esi
mov eax, dword [ebp - 0x540]
adc eax, 0
cmp eax, dword [ebp - 0x548]
mov dword [ebp - 0x540], eax
jb 0x406040
ja 0x406148
mov edx, dword [ebp - 0x544]
cmp edx, dword [ebp - 0x54c]
jb 0x406040
mov eax, dword [ebp - 0x550]
mov eax, dword [eax + 0x54]
test eax, eax
je 0x40617d
lea edx, [ebp - 0x568]
lea ecx, [ebp - 0x544]
mov dword [ebp - 0x564], 0
push edx
mov dword [ebp - 0x568], edi
mov dword [ebp - 0x564], ecx
call eax
add esp, 4
push edi
call fcn.00420ede
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x554]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4061af
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40621c
push 0xff
lea ecx, [ebp - 0x11b]
push 0
push ecx
mov byte [ebp - 0x11c], 0
call fcn.00445a00
push esi
lea edx, [ebp - 0x11c]
push str.http_file_download_fail____d
push edx
call fcn.004437c1
add esp, 0x18
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x40621c
push str.http_file_download_fail__intsess_httpconn_is_null_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00441b4d
mov esp, ebp
pop ebp
ret