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

Disassembly:
push 0xffffffffffffffff
push 0x1016c43e
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x101b01e4]
xor eax, esp
push eax
lea eax, [esp + 0xdc]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [esp + 0x34]
call fcn.1000d6c0
xor ebx, ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0xe4], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov ecx, dword [esi + 0x1f20]
cmp ecx, ebx
mov byte [esp + 0xe4], 1
je 0x10039801
push 1
lea eax, [esp + 0x38]
push eax
lea edx, [esp + 0x48]
push edx
call fcn.10049650
cmp eax, ebx
mov dword [esp + 0x50], eax
jne 0x10039801
cmp dword [esp + 0x58], 1
jne 0x10039801
cmp dword [esp + 0x5c], ebx
jne 0x10039801
mov dword [esp + 0x58], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], ebx
mov ecx, dword [esi + 0x180]
cmp ecx, ebx
mov byte [esp + 0xe4], 2
je 0x10039863
lea eax, [esp + 0x34]
push eax
lea edx, [esp + 0x74]
push edx
call fcn.1006d280
mov ecx, dword [esi + 4]
cmp ecx, ebx
je 0x10039879
lea eax, [esp + 0x34]
push eax
lea edx, [esp + 0x74]
push edx
call fcn.1006d280
mov eax, dword [esi + 0x1f20]
cmp eax, ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
je 0x1003989f
mov ecx, dword [eax + 0x17c0]
mov edx, dword [eax + 0x17c4]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
mov ecx, dword [esi + 0x178]
call fcn.1012d990
mov ecx, dword [esi + 0x178]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
call fcn.1012da0e
mov ecx, dword [esi + 0x178]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call fcn.1012df29
cmp dword [esp + 0x84], ebx
mov edi, eax
mov ebp, edx
jne 0x100398e6
add dword [esi + 0x2060], 1
jmp 0x100398ec
mov dword [esi + 0x2060], ebx
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x88]
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xa4], ecx
mov ecx, eax
sub ecx, dword [esi + 0x20b0]
mov dword [esp + 0xa8], edx
mov dword [esp + 0xb8], ecx
mov ecx, dword [esp + 0x18]
mov edx, ecx
sub edx, dword [esi + 0x20b8]
mov dword [esp + 0xcc], eax
mov dword [esp + 0xb0], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0xd0], edx
mov edx, dword [esp + 0x1c]
mov dword [esi + 0x20b0], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xb4], ebx
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xc0], ebx
mov dword [esp + 0xc4], edi
mov dword [esp + 0xc8], ebp
mov dword [esp + 0xd4], ecx
mov dword [esp + 0xd8], edx
mov dword [esi + 0x20b4], eax
mov dword [esi + 0x20b8], ecx
mov dword [esi + 0x20bc], edx
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov ecx, dword [esi + 0x20c0]
cmp eax, ecx
jb 0x100399bb
sub eax, ecx
jmp 0x100399c0
sub eax, ecx
sub eax, 1
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
cmp dword [esp + 0x14], 0x1f4
mov dword [esi + 0x20c0], eax
jbe 0x10039a24
mov eax, dword [esp + 0xb8]
mov edx, 0x3e8
mul edx
xor ecx, ecx
push ecx
mov ecx, dword [esp + 0x18]
push ecx
push edx
push eax
call fcn.1014a590
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0xb0]
mov edx, 0x3e8
mul edx
xor ecx, ecx
push ecx
mov ecx, dword [esp + 0x18]
push ecx
push edx
push eax
call fcn.1014a590
mov dword [esp + 0xb0], eax
jmp 0x10039a46
mov edx, dword [esp + 0xb8]
mov ecx, dword [esp + 0xb0]
lea eax, [edx + edx]
lea edx, [ecx + ecx]
mov dword [esp + 0xb8], eax
mov dword [esp + 0xb0], edx
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [esp + 0x30], eax
sub eax, dword [esi + 0x2088]
cmp eax, 0x1388
jb 0x10039b13
add edi, dword [esp + 0x18]
mov ecx, dword [esi + 0x2078]
adc ebp, dword [esp + 0x1c]
add edi, dword [esp + 0x20]
adc ebp, dword [esp + 0x24]
mov eax, edi
mov edi, dword [esi + 0x207c]
cmp ebp, edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebp
jg 0x10039a98
jl 0x10039a91
cmp eax, ecx
ja 0x10039a98
mov byte [esp + 0x14], 1
jmp 0x10039acd
mov eax, dword [esp + 0x28]
sub eax, dword [esi + 0x2080]
mov edx, dword [esp + 0x2c]
sbb edx, dword [esi + 0x2084]
mov ebp, dword [esp + 0x18]
sub ebp, ecx
mov ecx, dword [esp + 0x1c]
sbb ecx, edi
cmp ecx, edx
jg 0x10039ac9
jl 0x10039ac2
cmp ebp, eax
ja 0x10039ac9
mov byte [esp + 0x14], 1
jmp 0x10039acd
mov byte [esp + 0x14], bl
mov ecx, dword [esi + 0x1f20]
cmp ecx, ebx
je 0x10039ae1
mov eax, dword [esp + 0x14]
push eax
call fcn.10043e50
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
mov dword [esi + 0x2078], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esi + 0x207c], edx
mov edx, dword [esp + 0x30]
mov dword [esi + 0x2080], eax
mov dword [esi + 0x2084], ecx
mov dword [esi + 0x2088], edx
mov ecx, dword [esi + 0x178]
lea eax, [esp + 0xa0]
push eax
call fcn.1012d761
mov eax, dword [esp + 0xf0]
mov ecx, dword [esp + 0xec]
mov byte [ecx], bl
mov edx, dword [esi + 0x1b4]
mov ecx, dword [esp + 0x50]
mov dword [eax], edx
mov edx, dword [esp + 0x80]
add edx, ecx
mov ecx, dword [esp + 0x84]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x88]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x58]
add ecx, edx
mov edx, dword [esp + 0x5c]
mov dword [eax + 0x10], ecx
mov ecx, dword [esp + 0x8c]
add ecx, edx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ebx
add dword [esi + 0x2098], 1
mov ecx, dword [esi + 0x178]
cmp ecx, ebx
mov eax, dword [esi + 0x2098]
je 0x10039bde
cmp eax, 0x3c
jb 0x10039bde
mov edx, dword [esi + 0x2090]
mov eax, dword [esi + 0x2094]
mov edi, dword [esp + 0x24]
add edx, 0x7800
adc eax, ebx
cmp edi, eax
jl 0x10039bc1
jg 0x10039bbe
cmp dword [esp + 0x20], edx
jbe 0x10039bc1
push ebx
jmp 0x10039bc3
push 2
call fcn.1012dac4
mov edx, dword [esp + 0x20]
mov dword [esi + 0x2090], edx
mov dword [esi + 0x2094], edi
mov dword [esi + 0x2098], ebx
mov eax, dword [esp + 0x94]
cmp eax, ebx
je 0x10039c14
mov ecx, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x9c]
lea edx, [esp + 0x94]
push edx
push ecx
push eax
call fcn.1000fbb0
mov edx, dword [esp + 0xa4]
push edx
call fcn.10149646
add esp, 0x14
mov eax, dword [esp + 0x64]
cmp eax, ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], ebx
je 0x10039c53
mov ecx, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x6c]
lea edx, [esp + 0x64]
push edx
push ecx
push eax
call fcn.1000fbb0
mov edx, dword [esp + 0x74]
push edx
call fcn.10149646
add esp, 0x14
lea ecx, [esp + 0x34]
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
call fcn.100104c0
mov eax, dword [esp + 0x38]
push eax
call fcn.10149646
add esp, 4
mov ecx, dword [esp + 0xdc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 8