Function at 0x412fb0
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x50
mov eax, dword [0x4fb5dc]
mov dword [esp + 0x20], eax
mov al, byte [0x4fad14]
or al, byte [0x4fac57]
push ebp
mov ebp, edx
mov byte [esp + 5], al
mov dword [esp + 0x1c], ebp
jne 0x412fe1
xor dl, dl
xor cl, cl
pop ebp
add esp, 0x50
jmp fcn.00413cb0
push ebx
push esi
mov esi, dword [0x4fd940]
push edi
test esi, esi
jne 0x413128
push 0x1400
call fcn.004cb976
push 0x2800
mov dword [0x4fd940], eax
call fcn.004cb976
push 0x20000
mov dword [0x4fd944], eax
call fcn.004cb976
push 0x40000
mov dword [0x4fd934], eax
call fcn.004cb976
mov dword [0x4fd938], eax
mov eax, dword [0x4fb5e0]
add eax, eax
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 0x14
mov dword [0x4fd93c], ebx
test ebx, ebx
je 0x41311c
push 0x1400
push esi
mov esi, dword [0x4fd940]
push esi
call sub.VCRUNTIME140.dll_memset
mov edi, dword [0x4fd944]
push 0x2800
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov byte [esi + 0x15c], 3
add esp, 0x18
mov byte [esi + 0xcb0], 1
mov byte [esi + 0xcc4], 2
mov byte [esi + 0x170], 0xc
mov byte [esi + 0xcd8], 4
mov byte [esi + 0xcec], 8
mov byte [esi + 0x148], 0x30
mov byte [esi + 0xc88], 0x10
mov byte [esi + 0xc9c], 0x20
mov byte [esi + 0x724], 0x40
mov byte [esi + 0x738], 0x80
mov byte [edi + 0x24c], 1
mov byte [edi + 0x164c], 2
mov byte [edi + 0x468], 4
mov byte [edi + 0x1868], 8
mov byte [edi + 0x350], 0x10
mov byte [edi + 0x1840], 0x20
mov byte [edi + 0x1b24], 0x40
mov byte [edi + 0x1b38], 0x80
mov dword [esi + 0xb54], 0x4f92e8
mov dword [esi + 0x190], 0x4f92ec
mov dword [esi + 0xb40], 0x4f92f0
jmp 0x413134
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x50
jmp fcn.004142e0
mov edi, dword [0x4fd944]
mov ebx, dword [0x4fd93c]
lea eax, [esi + 9]
mov ecx, 0x100
mov edx, 0x7fff
and byte [eax + 3], 8
lea eax, [eax + 0x14]
mov word [eax - 0x17], dx
mov word [eax - 0x14], 0
mov byte [eax - 0x12], 0
mov byte [eax - 0xa], 0
sub ecx, 1
jne 0x413141
lea eax, [edi + 9]
mov ecx, 0x200
nop word [eax + eax]
and byte [eax + 3], 8
lea eax, [eax + 0x14]
mov word [eax - 0x17], dx
mov word [eax - 0x14], 0
mov byte [eax - 0x12], 0
mov byte [eax - 0xa], 0
sub ecx, 1
jne 0x413170
mov ecx, 0x4f818c
mov esi, 0x1fe
nop dword [eax + eax]
movzx edx, word [ecx]
lea eax, [edx - 1]
cmp ax, si
ja 0x4131b5
mov eax, edx
lea eax, [eax + eax*4]
mov byte [edi + eax*4 + 0x13], 1
add ecx, 8
cmp ecx, 0x4f81f4
jl 0x4131a0
mov edi, dword [0x4fd934]
mov eax, 0x7fff7fff
mov ecx, 0x8000
rep stosd dword es:[edi], eax
mov edi, dword [0x4fd938]
mov ecx, 0x10000
rep stosd dword es:[edi], eax
xor eax, eax
cmp dword [0x4fb5e0], eax
jle 0x4131fd
mov ecx, 0x7fff
nop
mov word [ebx + eax*2], cx
inc eax
cmp eax, dword [0x4fb5e0]
jl 0x4131f0
movzx eax, word [0x4fb5ec]
xor ecx, ecx
mov edx, 0xc
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004cb976
mov dword [esp + 0x3c], eax
add esp, 4
xor eax, eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], eax
test ebp, ebp
jle 0x413936
mov ecx, dword [esp + 0x38]
mov edi, 0x1ff
mov ebp, dword [0x4fd940]
add ecx, 6
mov ebx, dword [0x4fd944]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x28]
nop word [eax + eax]
mov edx, dword [esp + 0x30]
mov esi, dword [edx + eax*4]
mov al, byte [esi + 0x12]
test al, al
je 0x4132b6
cmp al, 4
jae 0x4132b6
cmp byte [0x4fa944], 0
je 0x41339d
cmp word [esi + 6], 0
jne 0x4132b6
mov edi, dword [esi + 0x20]
test edi, edi
je 0x4132b6
nop dword [eax]
mov ecx, edi
call fcn.004a01a0
test al, al
jne 0x41338c
mov edi, dword [edi + 8]
test edi, edi
jne 0x413290
mov ebp, dword [0x4fd940]
mov ebx, dword [0x4fd944]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edi, 0x1ff
inc eax
mov dword [esp + 0x20], eax
cmp eax, ecx
jl 0x413260
test esi, esi
je 0x413936
mov ebx, dword [esp + 0x38]
push 0x412c60
push 0xc
push esi
push ebx
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
add esp, 0x10
test esi, esi
jle 0x413936
mov eax, dword [0x4fd938]
mov edi, ebx
mov edx, dword [0x4fd940]
mov ebx, 0x7ff9
mov dword [esp + 0x54], eax
mov dword [esp + 0x40], edi
lea esi, [eax + 0x270]
mov dword [esp + 0x5c], edx
mov eax, dword [0x4fd934]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x44], esi
lea ecx, [eax + 0x14a]
mov dword [esp + 0x48], ecx
mov ecx, 0xfffffeb6
sub ecx, eax
mov eax, dword [0x4fd93c]
mov dword [esp + 0x50], ecx
mov ecx, dword [0x4fd944]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x34], eax
nop dword [eax + eax]
movzx ebp, word [edi + 0xa]
mov ax, bp
and ebp, 0x7fff
shr ax, 0xf
mov word [esp + 0x12], ax
mov dword [esp + 0x2c], ebp
cmp bp, bx
ja 0x4136a7
mov al, byte [edi + 6]
test al, al
je 0x413638
movzx eax, al
lea eax, [eax + eax*4]
lea esi, [edx + eax*4]
jmp 0x413642
mov ebp, dword [0x4fd940]
mov edi, 0x1ff
mov ebx, dword [0x4fd944]
cmp word [esi + 6], 0
je 0x4133e2
cmp byte [esi + 0x19], 0
je 0x4132b2
mov cl, byte [esi + 0x10]
test cl, cl
jne 0x4133c0
cmp word [esi + 8], 0
je 0x4132b2
movzx eax, word [esi + 8]
mov edx, eax
cmp ax, di
ja 0x4132b2
test cl, cl
jne 0x413402
lea eax, [eax + eax*4]
lea edi, [ebx + eax*4]
mov byte [edi + 0x13], 1
jmp 0x4134e9
mov eax, dword [esi + 0x20]
test eax, eax
je 0x4132b2
nop dword [eax]
cmp byte [eax + 0x1c], 0
jne 0x4133ae
mov eax, dword [eax + 8]
test eax, eax
jne 0x4133f0
jmp 0x4132b2
movzx ecx, cl
lea eax, [ecx + ecx*4]
lea edi, [eax*4]
add edi, ebp
sub ecx, 0x10
je 0x4134ab
sub ecx, 1
je 0x41346b
sub ecx, 1
jne 0x4134e9
mov byte [ebp + 0xcda], 1
mov byte [ebp + 0xcee], 1
mov byte [ebx + 0x46a], 1
mov byte [ebx + 0x186a], 1
cmp byte [esi + 0x16], cl
je 0x4134e9
mov byte [ebp + 0xcdb], 1
mov byte [ebp + 0xcef], 1
mov byte [ebx + 0x46b], 1
mov byte [ebx + 0x186b], 1
jmp 0x4134e9
mov byte [ebp + 0xcb2], 1
mov byte [ebp + 0xcc6], 1
mov byte [ebx + 0x24e], 1
mov byte [ebx + 0x164e], 1
cmp byte [esi + 0x16], 0
je 0x4134e9
mov byte [ebp + 0xcb3], 1
mov byte [ebp + 0xcc7], 1
mov byte [ebx + 0x24f], 1
mov byte [ebx + 0x164f], 1
jmp 0x4134e9
mov byte [ebp + 0xc8a], 1
mov byte [ebp + 0xc9e], 1
mov byte [ebx + 0x352], 1
mov byte [ebx + 0x1842], 1
cmp byte [esi + 0x16], 0
je 0x4134e9
mov byte [ebp + 0xc8b], 1
mov byte [ebp + 0xc9f], 1
mov byte [ebx + 0x353], 1
mov byte [ebx + 0x1843], 1
mov byte [edi + 0xa], 1
cmp byte [esi + 0x16], 0
movzx edx, word [esi + 4]
mov dword [esp + 0x34], edx
je 0x413509
or edx, 0x8000
mov byte [edi + 0xb], 1
mov dword [esp + 0x34], edx
mov cl, byte [esi + 0x11]
test cl, cl
jne 0x41351b
cmp word [esi + 0xa], 0
jne 0x41351b
xor al, al
jmp 0x41351d
mov al, 1
cmp byte [edi + 8], 0
je 0x4135a9
cmp byte [esi + 0xf], 0
jne 0x4135a9
test al, al
jne 0x4135ad
test byte [esi + 0x13], 2
jne 0x41354c
mov dx, word [esi + 8]
mov cl, byte [esi + 0x10]
push 0
call fcn.00412db0
mov edx, dword [esp + 0x38]
add esp, 4
cmp byte [esi + 0xf], 0
jne 0x41355c
test byte [esi + 0x13], 2
je 0x41355c
or byte [edi + 0xc], 1
movzx eax, word [esi + 6]
mov ecx, eax
test ax, ax
jne 0x41356a
movzx eax, dx
mov ecx, dword [esp + 0x2c]
mov word [ecx + 4], ax
mov al, byte [esi + 0x10]
mov byte [ecx], al
mov ax, word [esi + 8]
mov word [ecx + 2], ax
mov eax, dword [esi]
mov dword [ecx - 6], eax
mov al, byte [esi + 0xe]
mov byte [ecx - 2], al
mov al, byte [esi + 0x15]
mov esi, dword [esp + 0x24]
mov byte [ecx - 1], al
inc esi
add ecx, 0xc
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x28]
jmp 0x4132ba
test al, al
je 0x41354c
test cl, cl
je 0x4135eb
movzx eax, cl
lea eax, [eax + eax*4]
cmp byte [ebp + eax*4 + 8], 0
je 0x4135cc
push 1
xor edx, edx
call fcn.00412db0
add esp, 4
jmp 0x413623
movzx eax, cl
lea eax, [eax + eax*4]
mov byte [ebp + eax*4 + 9], 1
test byte [esi + 0x13], 1
je 0x413623
movzx eax, byte [esi + 0x11]
lea eax, [eax + eax*4]
or byte [ebp + eax*4 + 0xc], 1
jmp 0x413623
movzx eax, word [esi + 0xa]
mov ecx, eax
lea eax, [eax + eax*4]
cmp byte [ebx + eax*4 + 8], 0
mov eax, ecx
lea eax, [eax + eax*4]
mov byte [ebx + eax*4 + 9], 1
jne 0x413623
test byte [esi + 0x13], 1
je 0x413617
movzx eax, word [esi + 0xa]
lea eax, [eax + eax*4]
or byte [ebx + eax*4 + 0xc], 1
movzx eax, word [esi + 0xa]
lea eax, [eax + eax*4]
mov byte [ebx + eax*4 + 0x13], 1
movzx eax, word [edi + 6]
mov word [esi + 0xc], ax
movzx eax, word [esi + 4]
mov word [edi + 6], ax
jmp 0x4132b2
movzx eax, word [edi + 8]
lea eax, [eax + eax*4]
lea esi, [ecx + eax*4]
movzx eax, word [esi + 6]
add esi, 6
mov ebx, 0x7fff
mov ecx, eax
mov edx, eax
cmp ax, bx
je 0x413692
mov ebp, dword [esp + 0x30]
mov ebx, ecx
mov edi, 0x7fff
movzx ecx, bx
mov eax, dword [ebp + ecx*4]
cmp byte [eax + 0x11], 0
jne 0x413678
cmp word [eax + 0xa], 0
mov edx, ecx
je 0x41368a
movzx ecx, word [eax + 0xc]
lea esi, [eax + 0xc]
mov eax, ecx
mov ebx, ecx
mov edx, eax
cmp cx, di
jne 0x413662
mov edi, dword [esp + 0x40]
mov ebp, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
movzx eax, bp
mov eax, dword [ecx + eax*4]
mov word [eax + 0xc], dx
mov word [esi], bp
mov esi, dword [esp + 0x44]
mov bl, byte [edi + 4]
mov ebp, dword [edi]
mov dword [esp + 0x28], ebp
test bl, bl
je 0x4136e9
mov al, bl
and al, 0xc0
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
test bl, 0xc
cmove edx, ecx
mov ecx, edx
or ecx, 4
test bl, 0x30
cmove ecx, edx
mov eax, ecx
or eax, 2
test bl, 3
cmove eax, ecx
or ebp, eax
mov dword [esp + 0x28], ebp
cmp byte [edi + 5], 0
je 0x4136f3
xor dl, dl
jmp 0x413736
mov ebx, dword [edi]
mov ecx, dword [edi]
and bl, 8
neg bl
sbb bl, bl
and bl, 0xc0
mov al, bl
or al, 0xc
test cl, 1
movzx edx, al
movzx eax, bl
cmove edx, eax
mov al, dl
or al, 3
test cl, 2
movzx ebx, al
movzx eax, dl
cmove ebx, eax
mov al, bl
or al, 0x30
test cl, 4
movzx edx, al
movzx eax, bl
cmove edx, eax
or dl, byte [edi + 4]
not dl
movzx eax, dl
lea ebx, [edi + 0xa]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x20], eax
mov ecx, eax
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x14], esi
nop word [eax + eax]
test dword [esp + 0x3c], eax
jne 0x4138e4
and al, 0xc0
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
test byte [esp + 0x18], 0xc
cmove edx, ecx
mov ecx, dword [esp + 0x18]
mov esi, edx
mov al, cl
or esi, 4
test cl, 0x30
cmove esi, edx
mov ecx, esi
or ecx, 2
test al, 3
cmove ecx, esi
and ecx, ebp
cmp ebp, ecx
jne 0x413b4d
mov al, byte [edi + 4]
test al, al
je 0x4137d0
movzx ecx, al
mov eax, ecx
and eax, dword [esp + 0x18]
cmp ecx, eax
jne 0x413b4d
mov dl, byte [edi + 6]
mov byte [esp + 0x10], dl
test dl, dl
je 0x4137e8
mov ecx, dword [esp + 0x4c]
movzx eax, dl
add eax, dword [esp + 0x1c]
jmp 0x4137f8
movzx eax, word [edi + 8]
add eax, dword [esp + 0x50]
add eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x54]
lea ebp, [ecx + eax*2]
mov esi, 0x7fff
movzx eax, word [ebp]
mov ecx, eax
cmp ax, si
je 0x413a2d
mov ax, word [0x4fb5ec]
mov esi, ecx
and esi, 0x7fff
cmp word [esp + 0x2c], ax
jae case.0x413a57.19
cmp si, ax
jae case.0x413a57.19
mov ax, cx
shr ax, 0xf
cmp byte [esp + 0x12], 0
je 0x4139b1
test al, al
jne 0x413a2d
mov eax, dword [0x4fb5dc]
mov ecx, esi
mov ecx, dword [eax + ecx*4]
mov eax, 0xff
cmp byte [ecx + 0x15], 0
jne 0x413864
movzx eax, byte [ecx + 0xf]
test dword [esp + 0x3c], eax
jne 0x4139ac
mov al, byte [ecx + 0xe]
not al
test byte [edi + 4], al
jne 0x4139ac
mov eax, dword [ecx]
not eax
test dword [edi], eax
je 0x4138c0
mov bl, byte [ecx + 0xf]
mov al, bl
and al, 0xc0
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
test bl, 0xc
cmove edx, ecx
mov ecx, edx
or ecx, 4
test bl, 0x30
cmove ecx, edx
mov eax, ecx
or eax, 2
test bl, 3
cmove eax, ecx
not eax
test dword [edi], eax
jne 0x4139a8
mov edx, dword [esp + 0x34]
lea ebx, [edi + 0xa]
mov ax, word [ebx]
mov ecx, esi
mov word [edx + ecx*2], ax
mov ecx, dword [esp + 0x20]
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
add edx, 0x100
inc eax
add ecx, 0x200
mov dword [esp + 0x18], eax
add esi, 0x400
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], esi
cmp edx, 0xff00
jle 0x413770
mov ecx, dword [esp + 0x58]
add edi, 0xc
sub dword [esp + 0x24], 1
mov ebx, 0x7ff9
mov edx, dword [esp + 0x5c]
mov esi, dword [esp + 0x44]
mov dword [esp + 0x40], edi
jne 0x413350
push dword [esp + 0x38]
call fcn.004cb97f
mov esi, dword [0x4fd940]
add esp, 4
cmp byte [esi + 0x14a], 0
je 0x413962
push 0xa1
mov dl, 0xa0
mov cl, 0x10
call fcn.00413c10
add esp, 4
cmp byte [esi + 0x15e], 0
je 0x41397c
push 0xa3
mov dl, 0xa2
mov cl, 0x11
call fcn.00413c10
add esp, 4
cmp byte [esi + 0x172], 0
je 0x413996
push 0xa5
mov dl, 0xa4
mov cl, 0x12
call fcn.00413c10
add esp, 4
mov cl, byte [esp + 0x11]
xor dl, dl
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x50
jmp fcn.00413cb0
mov dl, byte [esp + 0x10]
lea ebx, [edi + 0xa]
jmp 0x413a2d
test al, al
je 0x4139b9
mov edx, ecx
jmp 0x4139e2
mov eax, dword [esp + 0x2c]
mov ebx, 0x7fff
mov ecx, dword [esp + 0x34]
movzx eax, ax
cmp word [ecx + eax*2], bx
lea ebx, [edi + 0xa]
jne 0x413a2d
movzx eax, word [ecx + esi*2]
mov ecx, 0x7fff
mov edx, eax
cmp ax, cx
je 0x413a29
mov eax, dword [0x4fb5dc]
mov ecx, edx
and ecx, 0x7fff
mov ecx, dword [eax + ecx*4]
cmp byte [ecx + 0x15], 0
jne 0x413a05
mov al, byte [ecx + 0xf]
or al, byte [esp + 0x40]
not al
test al, al
jne 0x413a29
mov eax, dword [esp + 0x28]
not eax
test dword [ecx], eax
jne 0x413a29
movzx eax, byte [edi + 4]
not eax
test byte [ecx + 0xe], al
jne 0x413a29
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
movzx eax, ax
mov word [ecx + eax*2], dx
mov dl, byte [esp + 0x10]
mov eax, ebx
mov ax, word [eax]
mov word [ebp], ax
test dl, dl
je case.0x413a57.19
movzx eax, byte [edi + 6]
add eax, 0xfffffff0
cmp eax, 0x95
ja case.0x413a57.19
movzx eax, byte [eax + 0x413b74]
jmp dword [eax*4 + 0x413b58]
mov ecx, dword [esp + 0x20]
movzx eax, word [ebx]
mov edx, dword [esp + 0x14]
mov word [ecx - 2], ax
movzx eax, word [ebx]
mov word [edx - 0x200], ax
cmp byte [edi + 6], 0xa4
je 0x4138d4
movzx eax, word [ebx]
mov word [ecx], ax
movzx eax, word [ebx]
mov word [edx], ax
jmp 0x4138d4
mov ecx, dword [esp + 0x20]
movzx eax, word [ebx]
mov edx, dword [esp + 0x14]
mov word [ecx], ax
movzx eax, word [ebx]
mov word [edx], ax
jmp 0x4138d4
mov ecx, dword [esp + 0x20]
movzx eax, word [ebx]
mov edx, dword [esp + 0x14]
mov word [ecx - 0xa], ax
movzx eax, word [ebx]
mov word [edx - 0x21c], ax
cmp byte [edi + 6], 0xa0
je 0x4138d4
movzx eax, word [ebx]
mov word [ecx - 8], ax
movzx eax, word [ebx]
mov word [edx - 4], ax
jmp 0x4138d4
mov ecx, dword [esp + 0x20]
movzx eax, word [ebx]
mov edx, dword [esp + 0x14]
mov word [ecx - 8], ax
movzx eax, word [ebx]
mov word [edx - 4], ax
jmp 0x4138d4
mov ecx, dword [esp + 0x20]
movzx eax, word [ebx]
mov edx, dword [esp + 0x14]
mov word [ecx - 6], ax
movzx eax, word [ebx]
mov word [edx - 0x236], ax
cmp byte [edi + 6], 0xa2
je 0x4138d4
movzx eax, word [ebx]
mov word [ecx - 4], ax
movzx eax, word [ebx]
mov word [edx - 0x36], ax
jmp 0x4138d4
mov ecx, dword [esp + 0x20]
movzx eax, word [ebx]
mov edx, dword [esp + 0x14]
mov word [ecx - 4], ax
movzx eax, word [ebx]
mov word [edx - 0x36], ax
jmp 0x4138d4
mov ecx, dword [esp + 0x20]
jmp 0x4138d8