Function at 0x511870
Capabilities:
Check for time delay via gettickcount
Create thread
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x44
push ebx
mov ebx, dword [esp + 0x4c]
push ebp
push esi
push edi
lea eax, [esp + 0x3c]
push ebx
push eax
call fcn.0050c020
mov ecx, 6
mov esi, eax
lea edi, [esp + 0x2c]
xor ebp, ebp
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x30]
add esp, 8
cmp esi, ebp
jne 0x5118aa
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x5118c2
cmp esi, 1
je 0x511e69
cmp esi, 0x12
ja 0x511cce
je 0x511c67
add esi, 0xfffffffe
cmp esi, 0xd
ja case.0x5118d2.7
xor ecx, ecx
mov cl, byte [esi + 0x511e9c]
jmp dword [ecx*4 + 0x511e84]
cmp dword [ebx + 0x438], 4
je case.0x5118d2.7
mov ecx, dword [ebx + 0x54]
cmp ecx, ebp
jg 0x511919
cmp dword [ebx + 0x1c], ebp
jg 0x511919
cmp dword [ebx + 0x64], 1
je 0x511919
mov edx, dword [esp + 0x30]
lea eax, [ebx + 0xa4]
dec edx
push edx
push 0xffffffffffffffff
push eax
push ebx
call fcn.005101f0
mov esi, eax
add esp, 0x10
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebp
jmp 0x5119a7
mov eax, dword [ebx + 8]
dec eax
cmp eax, 3
ja case.default.0x511922
jmp dword [eax*4 + 0x511eac]
push ebp
lea ecx, [ebx + 0x94]
push 1
push ecx
call fcn.0050c310
add esp, 0xc
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x58]
cmp eax, 0xffffffff
je case.0x5118d2.7
cmp eax, 0xfffffffe
je case.0x5118d2.7
mov ebp, eax
mov ecx, dword [ebx + 0xa0]
lea edi, [ebp*8]
sub edi, ebp
shl edi, 2
mov edx, dword [edi + ecx + 0x10]
lea eax, [edi + ecx]
push edx
lea ecx, [ebx + 0xa4]
mov eax, dword [eax + 0xc]
push eax
push ecx
push ebx
call fcn.005101f0
mov esi, eax
add esp, 0x10
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebp
mov edx, dword [ebx + 0xa0]
mov dword [edi + edx + 0x18], esi
mov ecx, dword [ebx + 0x54]
mov eax, dword [ebx + 0x4c]
inc ecx
xor edx, edx
div ecx
xor ebp, ebp
mov dword [ebx + 0x30], eax
lea edx, [esp + 0x1c]
push edx
push ebp
push esi
push 0x50d030
push ebp
push ebp
call fcn.0053c6b4
add esp, 0x18
cmp eax, ebp
jne 0x511e0f
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp case.0x5118d2.7
mov edx, dword [ebx + 0x3ec]
lea eax, [ebx + 0x94]
push edx
push 1
push eax
jmp 0x511933
cmp ecx, ebp
jg case.0x5118d2.7
mov dword [esp + 0x58], ebp
jmp 0x511957
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
cmp dword [esi + 0x43c], 5
je case.0x5118d2.7
cmp edi, ebp
jne 0x511a64
lea eax, [esi + 0x94]
push eax
call fcn.0050c2e0
add esp, 4
cmp eax, ebp
mov dword [esp + 0x10], eax
jl case.0x5118d2.7
mov ecx, dword [esi + 0x54]
mov eax, 1
cmp ecx, eax
jne 0x511a45
cmp dword [esi + 4], eax
jne case.0x5118d2.7
mov eax, dword [esp + 0x10]
mov edx, dword [esi + 0xa0]
lea ecx, [eax*8]
sub ecx, eax
mov edi, dword [edx + ecx*4 + 0x18]
cmp edi, ebp
je case.0x5118d2.7
mov eax, dword [edi + 0x1c]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
mov dword [esp + 0x14], eax
je 0x511a77
mov dword [esp + 0x14], ecx
mov ecx, dword [esi + 0x48]
mov eax, 0x66666667
imul ecx
mov ecx, dword [esi + 0x54]
mov dword [edi + 8], 0
sar edx, 3
mov eax, edx
mov dword [esp + 0x18], ecx
shr eax, 0x1f
add edx, eax
mov ebp, edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test ebp, ebp
mov dword [esp + 0x10], 0
jle 0x511ace
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [edi + 8], 0xffffffff
je 0x511ace
mov eax, dword [esp + 0x10]
inc eax
cmp eax, ebp
mov dword [esp + 0x10], eax
jl 0x511aad
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
call ebp
cmp dword [edi + 8], 0xffffffff
je 0x511b63
lea edx, [esi + 0xa4]
push edi
push edx
call fcn.00510310
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x54]
add esp, 8
dec eax
cmp eax, ecx
je 0x511b20
mov ecx, dword [esi + 0x434]
push ecx
call fcn.00510630
mov edx, dword [esi + 0x54]
dec edx
mov dword [esi + 0x54], edx
mov edx, dword [esi + 0x434]
push edx
call fcn.00510640
add esp, 8
mov ecx, dword [esi + 0xa0]
test ecx, ecx
je 0x511b48
mov eax, dword [edi + 0x1c]
push 0
lea edx, [eax*8]
sub edx, eax
mov ebp, dword [ecx + edx*4 + 0xc]
lea eax, [ecx + edx*4]
mov ecx, dword [ecx + edx*4 + 0x14]
add ecx, ebp
push ecx
jmp 0x511b4c
push 0
push 0
push edi
push 9
push 0x15
push esi
call fcn.0050bfc0
add esp, 0x18
push edi
call fcn.0050b050
add esp, 4
lea edx, [esi + 0xa4]
push edi
push edx
call fcn.00510280
mov ecx, dword [esp + 0x1c]
xor edx, edx
add esp, 8
lea eax, [ecx*8]
sub eax, ecx
mov ecx, dword [esi + 0xa0]
shl eax, 2
mov dword [ecx + eax], edx
mov ecx, dword [esi + 0xa0]
mov dword [ecx + eax + 8], edx
mov ecx, dword [esi + 0xa0]
mov dword [ecx + eax + 0x18], edx
mov ecx, dword [esi + 0x54]
cmp ecx, edx
je 0x511bb6
mov eax, dword [esi + 0x4c]
div ecx
mov dword [esi + 0x30], eax
jmp case.0x5118d2.7
cmp dword [esi + 4], 1
je case.0x5118d2.7
push 0
push 0
push 0
push 0
push 0x12
push esi
call fcn.0050bfc0
add esp, 0x18
jmp case.0x5118d2.7
mov edi, dword [esp + 0x2c]
lea edx, [ebx + 0xa4]
push edi
push edx
call fcn.00510440
mov esi, dword [esp + 0x38]
add esp, 8
cmp esi, ebp
je case.0x5118d2.7
mov edx, dword [esi + 4]
cmp edx, 0x1001
je case.0x5118d2.7
mov ecx, dword [ebx + 0x6c]
cmp ecx, ebp
je case.0x5118d2.7
mov eax, dword [esi + 0x288]
cmp eax, ebp
jne 0x511c22
lea eax, [esi + 0x88]
push ebx
push edx
push eax
lea eax, [esi + 8]
push eax
push edi
call ecx
push esi
push ebx
call fcn.00510100
add esp, 8
jmp case.0x5118d2.7
push ebx
call fcn.0050bef0
push ebx
call fcn.0050bda0
push ebx
call fcn.0050bf00
push ebp
push ebp
push ebp
push ebp
push 1
push ebx
call fcn.0050bfc0
push ebx
call fcn.0050bef0
add esp, 0x28
jmp case.0x5118d2.7
push ebp
push ebp
push ebp
push ebp
push 2
push ebx
call fcn.0050bfc0
mov eax, dword [ebx + 0x55c]
add esp, 0x18
cmp eax, ebp
je case.0x5118d2.7
lea ecx, [ebx + 0xa4]
push ecx
push ebx
call fcn.00510350
mov eax, dword [ebx + 0x78]
add esp, 8
cmp eax, ebp
je 0x511ca5
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebx + 0x78], ebp
mov eax, dword [ebx + 0x55c]
cmp eax, ebp
je 0x511cbc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x55c], ebp
mov dword [ebx + 0x78], 0xfffffffe
mov dword [ebx + 0x55c], ebp
jmp case.0x5118d2.7
cmp esi, 0x15
ja 0x511e41
je 0x511e1a
sub esi, 0x13
je 0x511de2
dec esi
jne case.0x5118d2.7
mov ecx, dword [ebx + 0x48]
mov eax, 0x66666667
imul ecx
mov esi, dword [ebx + 0xa4]
lea edi, [ebx + 0xa4]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
test esi, esi
mov ebp, edx
je case.0x5118d2.7
mov dword [0x7032cc], 1
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je 0x511d9e
xor eax, eax
mov dword [esi + 8], eax
cmp ebp, eax
mov dword [0x7032cc], 3
mov dword [esp + 0x14], eax
jle 0x511d73
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [0x7032cc], 4
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je 0x511d69
mov eax, dword [esp + 0x14]
inc eax
cmp eax, ebp
mov dword [esp + 0x14], eax
jl 0x511d40
jmp 0x511d73
mov dword [0x7032cc], 5
cmp dword [esi + 8], 0xffffffff
je 0x511d9e
push esi
push edi
mov dword [0x7032cc], 6
call fcn.00510310
mov ecx, dword [ebx + 0x18]
push 0
push ecx
push esi
push 9
push 0x15
push ebx
call fcn.0050bfc0
add esp, 0x20
push esi
push edi
mov dword [0x7032cc], 7
call fcn.00510280
push 0
push 0
push 0
push 0
push 0x12
mov dword [ebx + 0x54], 0
push ebx
mov dword [0x7032cc], 9
call fcn.0050bfc0
add esp, 0x20
mov dword [0x7032cc], 0xa
jmp case.0x5118d2.7
push ebp
lea edx, [ebx + 0xa4]
push ebp
push edx
push ebx
call fcn.005101f0
mov esi, eax
lea eax, [esp + 0x30]
push eax
push ebp
push esi
push 0x50dd50
push ebp
push ebp
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebp
call fcn.0053c6b4
add esp, 0x28
mov dword [esi + 0x8c], eax
jmp case.0x5118d2.7
mov eax, dword [ebx + 0x70]
cmp eax, ebp
je case.0x5118d2.7
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
push ebx
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x38]
push ecx
push edx
call eax
jmp case.0x5118d2.7
cmp esi, 0x1000
jne case.0x5118d2.7
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
push eax
push ecx
push str._d___s_n
call fcn.0053cd65
add esp, 0xc
jmp case.0x5118d2.7
pop edi
mov dword [ebx + 0x7c], ebp
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x44
ret