Function at 0x5151f0
Capabilities:
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x596ad8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa4c
push ebx
push esi
push edi
push 0x400
lea eax, [ebp - 0x857]
push 0
push eax
mov byte [ebp - 0x858], 0
call fcn.00555020
push 0x3ff
lea ecx, [ebp - 0x453]
push 0
push ecx
mov byte [ebp - 0x454], 0
call fcn.00555020
mov edx, dword [0x5f5774]
mov eax, dword [edx + 0xc]
add esp, 0x18
mov ecx, 0x5f5774
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
mov edx, dword [0x5f5774]
mov eax, dword [edx + 0xc]
mov ecx, 0x5f5774
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 3
mov ebx, dword [ebp + 0xc]
mov ecx, 0xd
mov esi, str.http:__www.staffcop.ru_activation_check.php_version
lea edi, [ebp - 0x454]
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsb byte es:[edi], byte [esi]
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x5152a0
lea edi, [ebp - 0x454]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x5152b2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x454]
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x5152d0
mov ecx, dword [str.ID]
mov dl, byte [0x5aa838]
mov dword [eax], ecx
mov byte [eax + 4], dl
mov eax, dword [ebp + 0x10]
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x5152f0
lea edi, [ebp - 0x454]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x515302
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x454]
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x515320
mov ecx, dword [str.hardw]
mov edx, dword [0x5aa830]
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [ebp - 0x54]
push eax
call fcn.00515100
add esp, 4
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0x10
jb 0x515351
mov eax, dword [eax]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x515353
lea edi, [ebp - 0x454]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x515363
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [ebp - 4], 3
cmp dword [ebp - 0x40], 0x10
jb 0x515391
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.00553d26
add esp, 4
cmp dword [0x5f740c], 0
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
je 0x515ad8
mov ecx, 7
mov esi, str._activation_check.php_version
lea edi, [ebp - 0x454]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, ebx
movsb byte es:[edi], byte [esi]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5153d0
lea edi, [ebp - 0x454]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x5153e0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x454]
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x515400
mov edx, dword [str.ID]
mov cl, byte [0x5aa838]
mov dword [eax], edx
mov byte [eax + 4], cl
mov eax, dword [ebp + 0x10]
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x515420
lea edi, [ebp - 0x454]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x515432
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x454]
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x515450
mov edx, dword [str.hardw]
mov ecx, dword [0x5aa830]
mov dword [eax], edx
lea edx, [ebp - 0x54]
push edx
mov dword [eax + 4], ecx
call fcn.00515100
add esp, 4
mov byte [ebp - 4], 5
mov ebx, 0x10
cmp dword [eax + 0x14], ebx
jb 0x515485
mov eax, dword [eax]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x515487
lea edi, [ebp - 0x454]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x515497
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [ebp - 4], 3
cmp dword [ebp - 0x40], ebx
jb 0x5154c4
mov eax, dword [ebp - 0x54]
push eax
call fcn.00553d26
add esp, 4
mov edi, dword [0x5f7418]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
test edi, edi
jne 0x5154ea
xor eax, eax
jmp 0x51550f
push edi
call esi
inc eax
cmp eax, 0x3fffffff
jle 0x5154f9
xor eax, eax
jmp 0x51550f
lea ebx, [eax + eax]
mov eax, ebx
call fcn.00558700
mov eax, esp
push 3
push ebx
push edi
push eax
call fcn.00472f50
push eax
lea ecx, [ebp - 0x1c]
call fcn.00443140
mov byte [ebp - 4], 6
push 1
push 0x5a3078
lea ecx, [ebp - 0x1c]
call fcn.00440af0
mov edi, dword [0x5f7414]
test edi, edi
jne 0x51553b
xor eax, eax
xor ecx, ecx
jmp 0x515579
push edi
call esi
inc eax
cmp eax, 0x3fffffff
jle 0x51554c
xor eax, eax
xor ecx, ecx
jmp 0x515579
lea ebx, [eax + eax]
mov eax, ebx
call fcn.00558700
mov eax, esp
push 3
push ebx
push edi
push eax
call fcn.00472f50
test eax, eax
jne 0x51556a
xor ecx, ecx
jmp 0x515579
mov ecx, eax
lea edi, [ecx + 1]
nop
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x515570
sub ecx, edi
push ecx
push eax
lea ecx, [ebp - 0x1c]
call fcn.00440af0
mov eax, dword [ebp - 0x1c]
cmp dword [eax - 4], 1
jle 0x51559b
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.00403d80
mov eax, dword [ebp - 0x1c]
push 0
push 0
push eax
push 3
push str.StaffcopAppProxy
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
test ebx, ebx
jne 0x515628
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x5155d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5155f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x515f3a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x515f3a
push 0
push 0
push 3
push 0
push 0
push 0x50
push str.www.staffcop.ru
push ebx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edi, eax
test edi, edi
jne 0x515698
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x515670
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x515693
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x5155f9
mov eax, dword [0x5f741c]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x5156cc
push eax
call esi
inc eax
cmp eax, 0x3fffffff
jle 0x5156b3
xor eax, eax
jmp 0x5156cc
lea esi, [eax + eax]
mov eax, esi
call fcn.00558700
mov ecx, dword [ebp - 0x30]
mov eax, esp
push 3
push esi
push ecx
push eax
call fcn.00472f50
push eax
lea ecx, [ebp - 0x28]
call fcn.00443140
mov byte [ebp - 4], 0xd
mov esi, dword [0x5f7420]
test esi, esi
jne 0x5156e7
xor eax, eax
jmp 0x515713
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x5156fa
xor eax, eax
jmp 0x515713
add eax, eax
mov dword [ebp - 0x30], eax
call fcn.00558700
mov edx, dword [ebp - 0x30]
mov eax, esp
push 3
push edx
push esi
push eax
call fcn.00472f50
push eax
lea ecx, [ebp - 0x20]
call fcn.00443140
mov byte [ebp - 4], 0xe
cmp dword [0x5f7408], 0
je 0x5157b9
lea eax, [ebp - 0x28]
push 0x59d4a4
push eax
call fcn.004319c0
add esp, 8
test al, al
je 0x5157b9
mov eax, dword [ebp - 0x28]
cmp dword [eax - 4], 1
mov esi, dword [eax - 0xc]
jle 0x51575a
push esi
lea ecx, [ebp - 0x28]
call fcn.00403d80
mov eax, dword [ebp - 0x28]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionA]
push eax
push 0x2b
push edi
call esi
test eax, eax
jne 0x5157a0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
push ebx
call esi
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x20]
call fcn.00404d60
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x28]
call fcn.00404d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1c]
call fcn.00404d60
jmp 0x515f1f
mov edx, dword [ebp - 0x20]
mov eax, dword [edx - 0xc]
push eax
lea ecx, [ebp - 0x20]
call fcn.00404120
push eax
push 0x2c
push edi
call esi
test eax, eax
je 0x51576b
push 0
push 0x400000
push 0
push 0x59d4a4
push str.HTTP_1.1
lea eax, [ebp - 0x454]
push eax
push 0x5a3044
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
test esi, esi
je 0x51576b
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x51576b
push 0
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0xa58]
push edx
push 0x16
push esi
mov dword [ebp - 0x2c], 0x200
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x51576b
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x20]
call fcn.00404d60
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x28]
call fcn.00404d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1c]
call fcn.00404d60
push 0x59d4a4
lea ecx, [ebp - 0x10]
call fcn.00405c70
push 0
push 0x59d4a4
lea ecx, [ebp - 0x14]
call fcn.00412d60
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [ebp - 0x34]
push ecx
push 0x400
lea edx, [ebp - 0x858]
push edx
push esi
mov dword [ebp - 0x34], 0
call edi
cmp dword [ebp - 0x34], 0
je 0x5158db
jmp 0x515890
lea eax, [ebp - 0x858]
push eax
lea ecx, [ebp - 0x14]
push 0x5aa808
push ecx
call fcn.005150e0
push 0x401
lea edx, [ebp - 0x858]
push 0
push edx
call fcn.00555020
add esp, 0x18
lea eax, [ebp - 0x34]
push eax
push 0x400
lea ecx, [ebp - 0x858]
push ecx
push esi
mov dword [ebp - 0x34], 0
call edi
cmp dword [ebp - 0x34], 0
jne 0x515890
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
mov edx, dword [ebp - 0x14]
mov ebx, dword [edx - 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea eax, [ebx*8]
push eax
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x515953
mov eax, dword [ebp - 0x14]
cmp dword [eax - 4], 1
jle 0x515924
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00403d80
mov eax, dword [ebp - 0x14]
push ebx
push esi
push ebx
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
lea edx, [ebp - 0x10]
push 0x59e304
push edx
call fcn.004060d0
add esp, 0xc
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
jle 0x515f1f
push 0x7b
push eax
call fcn.00555d9c
add esp, 8
test eax, eax
je 0x515f1f
mov ecx, dword [ebp - 0x10]
sub eax, ecx
sar eax, 1
mov esi, eax
cmp esi, 0xffffffff
je 0x515f1f
push 0x7d
push ecx
call fcn.00557400
add esp, 8
test eax, eax
je 0x515f1f
sub eax, dword [ebp - 0x10]
sar eax, 1
cmp eax, 0xffffffff
je 0x515f1f
sub eax, esi
dec eax
push eax
inc esi
push esi
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x10]
call fcn.00418b50
mov byte [ebp - 4], 0x13
push eax
lea ecx, [ebp - 0x10]
call fcn.00407d40
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x2c]
call fcn.00404d60
lea ecx, [ebp - 0x10]
call fcn.0041ad00
mov ecx, eax
call fcn.004198e0
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.004021d0
add eax, 0x10
add esp, 4
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 0x15
push 0x59d4a4
lea ecx, [ebp - 0x10]
call fcn.00405c70
mov bl, 0x18
jmp 0x515a10
mov ecx, dword [ebp - 0x24]
cmp dword [ecx - 0xc], 0
jl 0x515b68
push 0x59e4c4
push ecx
call fcn.00555f9b
mov ecx, dword [ebp - 0x24]
add esp, 8
test eax, eax
je 0x515b68
sub eax, ecx
sar eax, 1
mov esi, eax
cmp esi, 0xffffffff
je 0x515b68
push esi
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x24]
call fcn.0041e300
mov byte [ebp - 4], 0x16
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00406040
mov byte [ebp - 4], 0x15
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x515a88
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx - 0xc]
sub eax, esi
dec eax
push eax
inc esi
push esi
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x24]
call fcn.00418b50
mov byte [ebp - 4], bl
push eax
lea ecx, [ebp - 0x24]
call fcn.00407d40
mov byte [ebp - 4], 0x15
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x515a10
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x515a10
push 0
push 0
push 0
push 0
push str.StaffcopApp
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
test ebx, ebx
jne 0x515b19
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x515b14
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x5155f9
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x454]
push ecx
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
jne 0x515845
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x515b63
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x5155f9
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00406040
mov edx, dword [0x5f5774]
mov eax, dword [edx + 0xc]
mov ecx, 0x5f5774
mov dword [ebp - 0x2c], 0
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov bl, 0x1b
mov byte [ebp - 4], bl
mov edi, dword [ebp + 0x14]
lea ebx, [ebx]
lea ecx, [ebp - 0x2c]
push ecx
push 0x5a0124
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x10]
call fcn.0041cc80
mov byte [ebp - 4], 0x1c
push eax
lea ecx, [ebp - 0x18]
call fcn.00407d40
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x515be4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x18]
call fcn.0041ad00
mov ecx, eax
call fcn.004198e0
mov eax, dword [ebp - 0x18]
mov edx, dword [eax - 0xc]
test edx, edx
jle 0x515c56
lea ecx, [edx - 1]
test ecx, ecx
js 0x515dbb
cmp ecx, edx
jg 0x515dbb
cmp word [eax + ecx*2], 0x2c
jne 0x515c56
lea eax, [edx - 1]
push eax
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x18]
call fcn.0041e300
mov byte [ebp - 4], 0x1e
push eax
lea ecx, [ebp - 0x18]
call fcn.00407d40
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x515c56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x28]
push ecx
push 0x59d750
lea edx, [ebp - 0x20]
push edx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x28], 0
call fcn.0041cc80
mov byte [ebp - 4], 0x20
lea eax, [ebp - 0x20]
push 0x59d4a4
push eax
call fcn.00442c30
add esp, 8
test al, al
je 0x515cde
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx - 0xc]
sub eax, dword [ebp - 0x28]
lea edx, [ebp - 0x38]
dec eax
push eax
push edx
lea ecx, [ebp - 0x18]
call fcn.004326e0
mov esi, eax
mov byte [ebp - 4], 0x21
lea eax, [ebp - 0x20]
push eax
mov ecx, edi
call fcn.004ac520
push esi
mov ecx, eax
call fcn.00407d40
mov byte [ebp - 4], 0x20
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x515cde
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x515d00
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x18]
push 0x59d4a4
push ecx
call fcn.00442c30
add esp, 8
test al, al
jne 0x515ba0
push str.Status
lea ecx, [ebp - 0x20]
call fcn.0040b4f0
mov byte [ebp - 4], 0x24
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x38]
push eax
mov ecx, edi
call fcn.0050b2d0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x20]
call fcn.00404d60
mov esi, dword [ebp - 0x38]
cmp esi, dword [edi + 4]
je 0x515f07
lea ecx, [esi + 0x10]
push str.ERROR
push ecx
call fcn.00426700
add esp, 8
test al, al
jne 0x515f07
lea edx, [esi + 0x10]
push str.EXPIRED
push edx
call fcn.00426700
add esp, 8
test al, al
je 0x515dc5
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x18]
call fcn.00404d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00404d60
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.00404d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00404d60
mov eax, 1
jmp 0x515f3f
push 0x80070057
call fcn.00401150
lea eax, [esi + 0x10]
push str.TOOMANY
push eax
call fcn.00426700
add esp, 8
test al, al
je 0x515e17
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x18]
call fcn.00404d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00404d60
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.00404d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00404d60
mov eax, 2
jmp 0x515f3f
lea ecx, [esi + 0x10]
push str.BLOCKED
push ecx
call fcn.00426700
add esp, 8
test al, al
je 0x515e69
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x18]
call fcn.00404d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00404d60
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.00404d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00404d60
mov eax, 4
jmp 0x515f3f
lea edx, [esi + 0x10]
push str.NOTFOUND
push edx
call fcn.00426700
add esp, 8
test al, al
je 0x515ebb
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x18]
call fcn.00404d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00404d60
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.00404d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00404d60
mov eax, 5
jmp 0x515f3f
push str.SUCCESS
add esi, 0x10
push esi
call fcn.00426700
add esp, 8
test al, al
je 0x515f07
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x18]
call fcn.00404d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00404d60
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.00404d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00404d60
xor eax, eax
jmp 0x515f3f
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x18]
call fcn.00404d60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.00404d60
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.00404d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00404d60
mov eax, 3
lea esp, [ebp - 0xa64]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret