Function at 0x4059c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xf0
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
mov dword [esp + 0xd4], ecx
shr ecx, 1
cmp ecx, eax
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xc0], eax
jae 0x4066bc
mov eax, dword [ebp + 0x18]
mov ebx, edi
shl ebx, 4
add ebx, esi
test edi, edi
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xb4], edx
mov dword [esp + 0xb8], eax
je 0x4066f3
mov eax, dword [eax]
mov dword [esp + 8], ebx
mov dword [esp + 0xd0], eax
jmp 0x405a4f
mov esi, dword [esp + 0xac]
cmp esi, ebx
je 0x40672a
lea eax, [esi + 0x10]
mov dword [esp + 0xac], eax
mov eax, dword [esi]
mov ecx, eax
neg ecx
jo 0x4066ec
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
lea edi, [esp + 0xb0]
mov esi, dword [esi + 8]
mov dword [esp + 0xd8], edi
mov dword [esp + 0xdc], eax
mov edi, dword [esp + 0xb4]
mov dword [esp + 0xe0], edx
mov dword [esp + 0xe8], ecx
mov ecx, dword [esp + 0xd0]
mov dword [esp + 0xe4], esi
mov esi, dword [esp + 0xb0]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov edx, dword [ecx + 8]
dec edx
and edx, 0xfffffff8
lea eax, [eax + edx + 8]
lea edx, [esp + 0xdc]
push edx
push eax
lea eax, [esp + 0x18]
push eax
call dword [ecx + 0xc]
mov edx, edi
add esp, 0xc
test esi, esi
mov dword [esp + 4], edi
je 0x405b00
cmp esi, 1
jne 0x405f80
mov eax, dword [edx + 0x40]
mov ecx, dword [edx + 0x44]
test al, 1
jne 0x406145
xor edx, edx
xor edi, edi
jmp 0x406173
pxor xmm0, xmm0
mov dword [esp + 0x98], 0x3b9aca00
mov dword [esp + 0x50], 0
movdqa xmmword [esp + 0x40], xmm0
mov ecx, dword [edx + 0x40]
mov eax, dword [edx + 0xc8]
test eax, ecx
jne 0x406110
xor esi, esi
jmp 0x405b52
inc esi
mov ecx, dword [edx + 0x40]
mov eax, dword [edx + 0xc8]
test eax, ecx
jne 0x406110
mov edi, dword [edx + 0xcc]
dec eax
xor ebx, ebx
mov dword [esp], esi
and eax, ecx
sub ebx, dword [edx + 0xc4]
lea esi, [eax + eax*2]
mov dword [esp + 0xc], edi
mov edi, dword [edi + esi*4 + 8]
cmp ecx, edi
jne 0x405b90
inc eax
cmp eax, dword [edx + 0xc0]
jae 0x405be0
lea ebx, [ecx + 1]
mov eax, ecx
lock cmpxchg dword [edx + 0x40], ebx
jne 0x405bf5
jmp 0x406346
add edi, dword [edx + 0xc4]
lea eax, [ecx + 1]
cmp edi, eax
jne 0x405c30
mfence
mov eax, dword [edx]
mov esi, dword [esp]
add eax, dword [edx + 0xc4]
cmp eax, ecx
je 0x405c6a
cmp esi, 6
mov eax, 6
cmovb eax, esi
test esi, esi
je 0x405c20
imul eax, eax
nop dword [eax]
pause
dec eax
jne 0x405bd0
jmp 0x405b40
and ebx, ecx
add ebx, dword [edx + 0xc4]
mov eax, ecx
lock cmpxchg dword [edx + 0x40], ebx
je 0x406346
mov esi, dword [esp]
mov eax, 6
cmp esi, 6
cmovb eax, esi
test esi, esi
je 0x405c20
imul eax, eax
nop word [eax + eax]
pause
dec eax
jne 0x405c10
jmp 0x405b40
mov esi, 1
jmp 0x405b41
mov esi, dword [esp]
cmp esi, 7
jae 0x405c5a
mov edx, dword [esp + 4]
test esi, esi
je 0x405b40
mov eax, esi
imul eax, esi
nop dword [eax]
pause
dec eax
jne 0x405c50
jmp 0x405b40
call dword [sym.imp.KERNEL32.dll_SwitchToThread]
mov edx, dword [esp + 4]
inc esi
jmp 0x405b41
mov esi, dword [esp + 0x98]
cmp esi, 0x3b9aca00
je 0x405e10
mov ebx, dword [esp + 0x90]
mov edi, dword [esp + 0x94]
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x4068b5
mov dword [esp + 0xc], ebx
mov dword [esp + 0x80], esi
mov dword [esp], edi
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
movq xmm0, qword [0x776178]
movd edx, xmm0
pshufd xmm0, xmm0, 0x55
movd ecx, xmm0
mov eax, edx
or eax, ecx
jne 0x405d22
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x4068b5
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
movq xmm0, qword [esp + 0x18]
mov eax, edx
movq qword [0x776178], xmm0
or eax, ecx
je 0x4068a5
mov dword [esp + 0x2c], ecx
push ecx
push edx
push ebx
push esi
mov edi, edx
mov dword [esp + 0xdc], edx
call fcn.004e21b0
mov dword [esp + 0x7c], ebx
mov ecx, eax
mov ebx, edx
mul edi
mov dword [esp + 0xc4], eax
mov eax, esi
imul esi, ebx, 0x3b9aca00
imul ebx, edi
mov edi, dword [esp + 0x7c]
add ebx, edx
mov edx, ecx
mov dword [esp + 0xc8], esi
mov esi, eax
mov eax, ecx
mov ecx, 0x3b9aca00
imul edx, dword [esp + 0x2c]
add ebx, edx
sub esi, dword [esp + 0xc4]
sbb edi, ebx
mul ecx
mov ebx, edx
mov dword [esp + 0x7c], eax
mov eax, esi
mov edx, 0x3b9aca00
imul ecx, edi, 0x3b9aca00
add ebx, dword [esp + 0xc8]
mul edx
add edx, ecx
push dword [esp + 0x2c]
push dword [esp + 0xd0]
push edx
push eax
call fcn.004e21b0
mov edi, eax
add edi, dword [esp + 0x7c]
adc edx, ebx
push 0
push 0x3b9aca00
push edx
push edi
call fcn.004e21b0
mov esi, edx
mov ebx, eax
imul ecx, eax, 0x3b9aca00
xor esi, dword [esp]
xor ebx, dword [esp + 0xc]
sub edi, ecx
xor ecx, ecx
or ebx, esi
mov ebx, dword [esp + 8]
setne cl
cmp eax, dword [esp + 0xc]
mov eax, 0xff
sbb edx, dword [esp]
mov edx, dword [esp + 4]
cmovb ecx, eax
cmp edi, dword [esp + 0x80]
mov eax, 0
sbb eax, eax
test cl, cl
cmovne eax, ecx
cmp al, 2
jb 0x40669c
mov eax, dword [0x776190]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov eax, dword [eax + 0x3c]
cmp eax, 1
jne 0x405ecb
mov eax, dword [0x776190]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov esi, dword [eax + 0x40]
mov dword [eax + 0x40], 0
test esi, esi
je 0x405edd
lea eax, [esp + 0x40]
lea ecx, [esp + 0x90]
mov dword [esp + 0x84], esi
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov edi, edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x18]
lea edx, [esp + 0x84]
call fcn.00403380
mov eax, dword [0x776190]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ecx + 0x40]
mov dword [ecx + 0x40], esi
test eax, eax
mov dword [esp + 0x18], eax
je 0x405ec4
lock dec dword [eax]
jne 0x405ec4
lea ecx, [esp + 0x18]
call fcn.0048efa0
mov edx, edi
jmp 0x405b1d
mov esi, edx
test eax, eax
jne 0x405f25
call fcn.004e3760
mov edx, esi
jmp 0x405e2e
mov esi, edx
call fcn.004e5dd0
lea edx, [esp + 0x40]
lea ecx, [esp + 0x90]
mov edi, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x18]
lea edx, [esp + 0x30]
call fcn.00403380
lock dec dword [edi]
jne 0x405f1c
lea ecx, [esp + 0x30]
call fcn.0048efa0
mov edx, dword [esp + 4]
jmp 0x405b1d
call fcn.004e5dd0
lea edx, [esp + 0x40]
lea ecx, [esp + 0x90]
mov edi, eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x18]
lea edx, [esp + 0x84]
call fcn.00403380
lock dec dword [edi]
jne 0x405f6b
lea ecx, [esp + 0x84]
call fcn.0048efa0
mov edx, dword [esp + 4]
jmp 0x405b1d
pxor xmm0, xmm0
mov dword [esp + 0x20], 0x3b9aca00
mov dword [esp + 0xa0], 0
xor eax, eax
mov cl, 1
movdqa xmmword [esp + 0x90], xmm0
lock cmpxchg byte [edx], cl
jne 0x406387
mov eax, dword [edx + 0x24]
test eax, eax
je 0x4063a0
mov ecx, dword [0x776190]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp byte [ecx + 0x38], 0
jne 0x405feb
mov ecx, dword [0x776190]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
mov word [ecx + 0x38], 1
mov ecx, dword [esp + 4]
shl eax, 2
xor edi, edi
lea edx, [eax + eax*2]
mov ecx, dword [ecx + 0x20]
jmp 0x40600d
add ecx, 0xc
inc edi
add edx, 0xfffffff4
je 0x4063a0
mov eax, dword [0x776190]
mov ebx, dword fs:[0x2c]
mov esi, dword [ecx]
mov eax, dword [ebx + eax*4]
lea eax, [eax + 0x39]
cmp dword [esi + 0x14], eax
je 0x406000
mov ebx, dword [ecx + 4]
xor eax, eax
lock cmpxchg dword [esi + 0xc], ebx
jne 0x406000
mov eax, dword [ecx + 8]
test eax, eax
je 0x40603f
mov dword [esi + 0x10], eax
mov eax, dword [esi + 8]
mov cl, 1
xchg byte [eax + 0x1c], cl
cmp cl, 0xff
jne 0x406056
add eax, 0x1c
push eax
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
mov ebx, dword [esp + 4]
mov esi, dword [ebx + 0x24]
cmp esi, edi
jbe 0x4068a5
mov ecx, dword [ebx + 0x20]
lea edx, [edi + edi*2]
not edi
add edi, esi
shl edi, 2
lea eax, [ecx + edx*4]
mov dword [esp + 0xc], eax
mov eax, dword [ecx + edx*4]
mov dword [esp], eax
mov eax, dword [ecx + edx*4 + 4]
mov dword [esp + 0x80], eax
mov eax, dword [ecx + edx*4 + 8]
lea ecx, [ecx + edx*4 + 0xc]
lea edx, [edi + edi*2]
mov dword [esp + 0x2c], eax
push edx
push ecx
push dword [esp + 0x14]
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [esp + 0xc]
add esp, 0xc
dec esi
test eax, eax
mov dword [ebx + 0x24], esi
je 0x4063a0
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 4]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x48], eax
mov dword [esp + 0xa0], eax
xor eax, eax
xchg byte [ecx], al
cmp al, 2
jne 0x4060e8
push ecx
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x406534
movq xmm0, qword [esp + 0x10]
movq qword [eax], xmm0
mov byte [eax + 8], 1
mov ebx, dword [esp + 8]
jmp 0x406545
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 8]
mov eax, 2
cmp cl, 5
je 0x4064f1
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], eax
mov eax, 1
cmp eax, 2
jne 0x4064f6
jmp 0x40650c
movzx eax, byte [esp + 0x10]
cmp al, 5
jne 0x40633e
jmp 0x40650c
mov edx, 1
mov eax, dword [ecx + 0x40]
mov ecx, dword [ecx + 0x44]
test al, 1
jne 0x4062e3
mov ebx, eax
mov dword [esp], edi
shr ebx, 1
and ebx, 0x1f
cmp ebx, 0x1f
jne 0x4061e0
mov edi, edx
lea esi, [edx + edx + 1]
imul edi, edx
nop dword [eax + eax]
cmp edx, 7
jae 0x4061b0
test edx, edx
je 0x4061ba
mov eax, edi
nop dword [eax + eax]
pause
dec eax
jne 0x4061a0
jmp 0x4061ba
mov ebx, edx
call dword [sym.imp.KERNEL32.dll_SwitchToThread]
mov edx, ebx
mov eax, dword [esp + 4]
mov ebx, dword [eax + 0x40]
mov ecx, dword [eax + 0x44]
mov eax, ebx
test al, 1
jne 0x4062e0
mov ebx, eax
add edi, esi
inc edx
add esi, 2
shr ebx, 1
and ebx, 0x1f
cmp ebx, 0x1f
je 0x406190
mov edi, dword [esp]
mov dword [esp + 0xc], eax
mov eax, ebx
xor eax, 0x1e
or eax, edi
jne 0x406227
mov dword [esp], ecx
mov esi, edx
xor ecx, ecx
mov edx, 0x178
movzx eax, byte [0x77618d]
call fcn.00490be0
test eax, eax
je 0x4068a5
mov edi, eax
push 0x178
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, dword [esp]
mov edx, esi
mov eax, dword [esp + 0xc]
test ecx, ecx
jne 0x406278
mov dword [esp], edx
xor ecx, ecx
mov edx, 0x178
movzx eax, byte [0x77618d]
call fcn.00490be0
test eax, eax
je 0x4068a5
push 0x178
push 0
push eax
mov esi, eax
call sub.VCRUNTIME140.dll_memset
mov ecx, esi
add esp, 0xc
mov edx, dword [esp + 4]
xor eax, eax
lock cmpxchg dword [edx + 0x44], esi
jne 0x4062bb
mov dword [edx + 4], ecx
mov edx, dword [esp]
mov eax, dword [esp + 0xc]
mov dword [esp], ecx
mov ecx, dword [esp + 4]
lea esi, [eax + 2]
lock cmpxchg dword [ecx + 0x40], esi
je 0x4065e3
cmp edx, 6
mov eax, 6
cmovb eax, edx
test edx, edx
je 0x406160
imul eax, eax
nop word cs:[eax + eax]
nop dword [eax]
pause
dec eax
jne 0x4062b0
inc edx
jmp 0x406165
test edi, edi
je 0x4062d2
push edi
push 0
push dword [0x776180]
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4062d4
mov edi, ecx
mov edx, dword [esp]
mov ecx, dword [esp + 4]
jmp 0x406165
mov edi, dword [esp]
xor ebx, ebx
xor esi, esi
test edi, edi
je 0x4062fa
push edi
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x10]
test esi, esi
je 0x406332
mov dword [esp], esi
mov ecx, dword [esp + 0x14]
mov esi, dword [esp]
lea edx, [ebx + ebx*2]
mov dword [esi + edx*4 + 8], ecx
mov dword [esi + edx*4 + 4], eax
lock or dword [esi + edx*4 + 0xc], 1
mov ecx, dword [esp + 4]
sub ecx, 0xffffff80
call fcn.00403930
mov ebx, dword [esp + 8]
jmp 0x40650c
mov ebx, dword [esp + 8]
cmp al, 5
je 0x40650c
movzx eax, al
jmp 0x406503
mov eax, dword [esp + 0xc]
movq xmm0, qword [esp + 0x10]
inc ecx
add edx, 0xa0
lea eax, [eax + esi*4]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
movq qword [eax], xmm0
mov dword [eax + 8], ecx
mov ecx, edx
call fcn.00403930
mov ebx, dword [esp + 8]
mov eax, 2
cmp eax, 2
jne 0x4064f6
jmp 0x40650c
mov ecx, edx
mov esi, edx
call fcn.004e59e0
mov edx, esi
mov eax, dword [edx + 0x24]
test eax, eax
jne 0x405fb9
nop dword [eax]
mov edx, dword [esp + 4]
cmp byte [edx + 0x34], 0
je 0x4063de
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
xor eax, eax
xchg byte [edx], al
mov ebx, dword [esp + 8]
cmp al, 2
jne 0x4064ed
push edx
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
jmp 0x4064ed
mov eax, dword [0x776190]
mov ecx, dword fs:[0x2c]
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov eax, dword [ecx + eax*4]
mov ebx, edx
shr ebx, 8
mov eax, dword [eax + 0x3c]
cmp eax, 1
jne 0x406561
mov eax, dword [0x776190]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov esi, dword [eax + 0x40]
mov dword [eax + 0x40], 0
test esi, esi
je 0x40660f
cmp dl, 5
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
je 0x4068a5
mov byte [esp + 0x40], dl
mov edx, dword [esp + 4]
mov word [esp + 0x41], bx
shr ebx, 0x10
lea eax, [esp + 0x90]
lea ecx, [esp + 0x18]
mov byte [esp + 0x43], bl
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], edx
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], ecx
lea ecx, [esp + 0x84]
lea edx, [esp + 0x40]
push esi
call fcn.00402890
add esp, 4
mov eax, dword [0x776190]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
mov eax, dword [ecx + 0x40]
mov dword [ecx + 0x40], esi
test eax, eax
mov dword [esp + 0x40], eax
je 0x4064bf
lock dec dword [eax]
jne 0x4064bf
lea ecx, [esp + 0x40]
call fcn.0048efa0
mov eax, dword [esp + 0x84]
mov ebx, dword [esp + 8]
cmp eax, 3
je 0x4068a0
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
mov eax, dword [esp + 0x34]
cmp eax, 2
je 0x40650c
test al, 1
je 0x4068a5
movzx eax, byte [esp + 0x38]
cmp eax, 5
jne 0x4068a5
cmp dword [esp + 0xdc], 0
je 0x405a40
push dword [esp + 0xe0]
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x405a40
movzx eax, byte [esp + 0x10]
mov ebx, dword [esp + 8]
cmp al, 5
jne 0x4068a7
mov eax, dword [esp + 0x40]
mov dword [esp + 0x34], 2
lock dec dword [eax]
jne 0x4064ed
lea ecx, [esp + 0x40]
call fcn.0048efa0
jmp 0x4064ed
mov esi, edx
cmp eax, 2
jne 0x406680
call fcn.004e5dd0
mov ecx, esi
mov dword [esp + 0x84], eax
cmp cl, 5
je 0x4068a5
mov edx, dword [esp + 4]
mov byte [esp + 0x40], cl
mov word [esp + 0x41], bx
shr ebx, 0x10
lea ecx, [esp + 0x90]
mov esi, eax
mov byte [esp + 0x43], bl
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], ecx
lea ecx, [esp + 0x34]
lea edx, [esp + 0x40]
push esi
call fcn.00402890
add esp, 4
lock dec dword [esi]
jne 0x4065da
lea ecx, [esp + 0x84]
call fcn.0048efa0
mov ebx, dword [esp + 8]
jmp 0x4064ed
cmp ebx, 0x1e
jne 0x40668c
mov eax, dword [esp]
test edi, edi
je 0x4068a5
mov dword [ecx + 0x44], edi
mov ebx, 0x1e
lock add dword [ecx + 0x40], 2
mov dword [eax], edi
mov eax, dword [esp + 0x10]
jmp 0x406305
mov esi, edx
call fcn.004e5dd0
mov ecx, esi
mov dword [esp + 0x30], eax
cmp cl, 5
je 0x4068a5
mov edx, dword [esp + 4]
mov byte [esp + 0x40], cl
mov word [esp + 0x41], bx
shr ebx, 0x10
lea ecx, [esp + 0x90]
mov esi, eax
mov byte [esp + 0x43], bl
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], ecx
lea ecx, [esp + 0x84]
lea edx, [esp + 0x40]
push esi
call fcn.00402890
add esp, 4
lock dec dword [esi]
jne 0x4064bf
lea ecx, [esp + 0x30]
jmp 0x4064ba
call fcn.004e3760
mov edx, esi
jmp 0x406409
mov esi, dword [esp]
test edi, edi
jne 0x4062eb
jmp 0x4062fa
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
xor eax, eax
cmp eax, 2
jne 0x4064f6
jmp 0x40650c
test dl, dl
je 0x4066e0
mov eax, dword [0x776190]
mov edx, dword fs:[0x2c]
mov eax, dword [edx + eax*4]
mov eax, dword [eax + 0x24]
test eax, eax
je 0x406742
add eax, 0x8c
jmp 0x40674f
test ebx, ebx
je 0x4059fa
shr ebx, 1
jmp 0x40675e
mov esi, dword [esp + 0xac]
sub ebx, esi
je 0x40672a
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
shr ebx, 4
add esi, 4
jmp 0x406716
add esi, 0x10
dec ebx
je 0x40672a
cmp dword [esi - 4], 0
je 0x406710
push dword [esi]
push 0
push dword [0x776180]
call edi
jmp 0x406710
mov ecx, dword [esp + 0xb0]
mov edx, dword [esp + 0xb4]
call fcn.00403fb0
jmp 0x40687b
mov dword [esp + 4], ecx
call fcn.004244c0
mov ecx, dword [esp + 4]
mov eax, dword [eax]
shr ebx, 1
mov eax, dword [eax + 0x104]
cmp eax, ebx
cmova ebx, eax
sub edi, ecx
mov dword [esp + 0xbc], ebx
mov dword [esp + 0x90], ecx
jb 0x4068a5
mov ebx, dword [ebp + 0x18]
mov dword [esp], edi
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov ebx, dword [ebx + 8]
test eax, eax
je 0x40679d
cmp eax, 1
jne 0x4067af
lock inc dword [edx + 0xc0]
jg 0x4067b9
mov ecx, 7
int 0x29
ud2
lock inc dword [edx + 0x100]
jg 0x4067b9
mov ecx, 7
int 0x29
ud2
lock inc dword [edx + 0x38]
jle 0x4068bd
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
mov edi, edx
mov dword [esp + 0x48], ebx
mov dword [esp + 4], ebx
lea ebx, [esp + 0xd4]
lea edx, [esp + 0x90]
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], edx
lea edx, [esp + 0xbc]
mov ebx, ecx
mov dword [esp + 0x54], edx
mov edx, dword [esp]
shl ebx, 4
add ebx, esi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], eax
lea eax, [esp + 0x90]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0xbc]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], ecx
mov eax, dword [0x776190]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov edx, dword [eax + 0x24]
test edx, edx
jne 0x40686d
call fcn.004244c0
mov ecx, dword [eax]
mov eax, dword [0x776190]
mov edx, dword fs:[0x2c]
mov eax, dword [edx + eax*4]
mov edx, dword [eax + 0x24]
test edx, edx
je 0x406883
cmp dword [edx + 0x8c], ecx
jne 0x406891
lea ecx, [esp + 0x40]
push 0
call section..text
add esp, 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
add ecx, 0x40
lea edx, [esp + 0x40]
call fcn.004e2eb0
jmp 0x40687b
lea eax, [esp + 0x40]
add ecx, 0x40
push eax
call fcn.004e3100
jmp 0x406878
call fcn.004e5dd0
ud2
mov edx, dword [esp + 0x14]
movzx ecx, al
call fcn.00404560
ud2
call dword [sym.imp.KERNEL32.dll_GetLastError]
ud2
mov ecx, 7
int 0x29
ud2