Function at 0x4f5e40
Capabilities:
Parse url

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53a195
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xf8
mov eax, dword [0x59a0a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 8]
add ecx, 0x424
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xb8]
push eax
lea eax, [ebp - 0xcc]
push eax
call fcn.0042be10
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4f5ebf
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4f5ed4
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x4f5ed8
mov ecx, edx
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0xb0], esi
push fcn.00403110
push 0x4051c0
push 6
push 0x18
lea eax, [ebp - 0xa8]
mov dword [ebp - 4], 0
push eax
call fcn.0049b297
push 0x3c
lea eax, [ebp - 0x108]
mov byte [ebp - 4], 1
push 0
push eax
call fcn.0049e130
mov edi, dword [ebp - 0xcc]
add esp, 0xc
mov eax, dword [edi + 0x84]
cmp dword [eax - 0xc], 0
jl 0x4f62f3
push str.fsname
push eax
call fcn.0049d574
add esp, 8
test eax, eax
je 0x4f62f3
sub eax, dword [edi + 0x84]
sar eax, 1
js 0x4f62f3
lea edi, [ebp - 0x98]
mov dword [ebp - 0xac], 6
mov ecx, dword [edi]
cmp ecx, 0x400
jb 0x4f5f95
mov dword [edi], 0x400
cmp dword [edi + 4], 8
jb 0x4f5f87
mov eax, dword [edi - 0x10]
xor ecx, ecx
mov word [eax + 0x800], cx
jmp 0x4f5fa7
lea eax, [edi - 0x10]
xor ecx, ecx
mov word [eax + 0x800], cx
jmp 0x4f5fa7
mov eax, 0x400
sub eax, ecx
lea ecx, [edi - 0x10]
push 0
push eax
call fcn.00404330
add edi, 0x18
sub dword [ebp - 0xac], 1
jne 0x4f5f63
cmp dword [ebp - 0x94], 8
lea eax, [ebp - 0xa8]
mov edi, dword [ebp - 0xcc]
lea ecx, [ebp - 0x108]
cmovae eax, dword [ebp - 0xa8]
cmp dword [ebp - 0x7c], 8
mov dword [ebp - 0x104], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x100], eax
lea eax, [ebp - 0x90]
cmovae eax, dword [ebp - 0x90]
cmp dword [ebp - 0x64], 8
mov dword [ebp - 0xf8], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0xf4], eax
lea eax, [ebp - 0x78]
cmovae eax, dword [ebp - 0x78]
cmp dword [ebp - 0x4c], 8
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0xe8], eax
lea eax, [ebp - 0x60]
cmovae eax, dword [ebp - 0x60]
cmp dword [ebp - 0x34], 8
mov dword [ebp - 0xe4], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0xe0], eax
lea eax, [ebp - 0x48]
cmovae eax, dword [ebp - 0x48]
cmp dword [ebp - 0x1c], 8
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0xd8], eax
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x108], 0x3c
mov dword [ebp - 0xd0], eax
mov eax, dword [edi + 0x84]
push ecx
push 0x10000000
push dword [eax - 0xc]
push eax
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x4f6222
push dword [ebp - 0xdc]
lea eax, [ebp - 0xb0]
push dword [ebp - 0xf8]
push dword [ebp - 0x104]
push str._s:___s_s
push eax
call fcn.004023f0
add esp, 0x14
lea eax, [edi + 0xc8]
mov dword [ebp - 0xc4], eax
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0xb0]
push eax
lea ecx, [edi + 0xb0]
call fcn.00411620
mov edx, dword [edi + 0xc0]
lea esi, [edi + 0xbc]
lea eax, [ebp - 0xac]
mov dword [ebp - 0xac], 4
cmp eax, edx
jae 0x4f6199
mov edi, dword [esi]
cmp edi, eax
ja 0x4f6199
mov ecx, dword [esi + 8]
sub eax, edi
sar eax, 2
mov dword [ebp - 0xb4], eax
cmp edx, ecx
jne 0x4f6181
mov eax, ecx
sub eax, edx
sar eax, 2
cmp eax, 1
jae 0x4f6181
sub edx, edi
mov edi, 0x3fffffff
sar edx, 2
mov eax, edi
sub eax, edx
cmp eax, 1
jae 0x4f6149
push 0x579260
call fcn.004980e5
sub ecx, dword [esi]
inc edx
sar ecx, 2
mov eax, ecx
mov dword [ebp - 0xbc], ecx
shr eax, 1
add ecx, eax
mov dword [ebp - 0xc0], 0
sub edi, eax
cmp edi, dword [ebp - 0xbc]
cmovb ecx, dword [ebp - 0xc0]
cmp ecx, edx
cmovb ecx, edx
push ecx
mov ecx, esi
call fcn.0042f480
mov ecx, dword [ebp - 0xb4]
mov eax, dword [esi]
lea eax, [eax + ecx*4]
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4f6206
mov eax, dword [eax]
mov dword [ecx], eax
jmp 0x4f6206
mov edi, dword [esi + 8]
cmp edx, edi
jne 0x4f61f9
mov eax, edi
sub eax, edx
sar eax, 2
cmp eax, 1
jae 0x4f61f9
sub edx, dword [esi]
mov ecx, 0x3fffffff
sar edx, 2
mov eax, ecx
sub eax, edx
cmp eax, 1
jae 0x4f61c9
push 0x579260
call fcn.004980e5
sub edi, dword [esi]
inc edx
sar edi, 2
mov eax, edi
shr eax, 1
sub ecx, eax
mov dword [ebp - 0xb4], ecx
cmp dword [ebp - 0xb4], edi
lea ecx, [eax + edi]
mov eax, 0
cmovb ecx, eax
cmp ecx, edx
cmovb ecx, edx
push ecx
mov ecx, esi
call fcn.0042f480
mov eax, dword [esi + 4]
test eax, eax
je 0x4f6206
mov dword [eax], 4
push dword [ebp - 0xc4]
add dword [esi + 4], 4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0xb0]
mov edi, dword [ebp - 0xcc]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x59fee8]
cmp eax, dword [ecx + 4]
jle 0x4f62d4
push 0x59fee8
call fcn.0049af28
add esp, 4
cmp dword [0x59fee8], 0xffffffff
jne 0x4f62d4
mov byte [ebp - 4], 2
xorps xmm0, xmm0
push 0
push 0x59fef0
mov dword [0x59feec], 0x57d120
movups xmmword [0x59fef0], xmm0
movq qword [0x59ff00], xmm0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x4f62a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4f629a
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x4f62a2
push eax
call fcn.00401b40
push 0x53eaa0
mov dword [0x59ff08], 0
mov dword [0x59ff0c], 0
call fcn.0049b282
add esp, 4
mov byte [ebp - 4], 1
push 0x59fee8
call fcn.0049aee9
add esp, 4
push dword [edi + 0x84]
push 4
push str.GameDownload::CMainUI::GenDownload_NoParamHttpList
push 0x5643f8
push 0x59feec
call fcn.004e76a0
add esp, 0x14
push fcn.00403110
push 6
push 0x18
lea eax, [ebp - 0xa8]
mov byte [ebp - 4], 0
push eax
call fcn.0049acff
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4f6344
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4f6342
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4f6344
call edx
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0049aa22
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4