Function at 0x10005520
Capabilities:
Create thread

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x10]
push ebx
push ebp
push esi
push edi
and eax, 0xffff
xor edi, edi
cmp eax, 4
mov ebp, ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
ja case.default.0x10005545
jmp dword [eax*4 + 0x10005828]
mov cx, word [ebp + 0x11e8]
mov eax, dword [esp + 0x1c]
push edi
push edi
push edi
push edi
push ecx
push 0x14
mov dword [ebp + 0x11ea], eax
push eax
jmp 0x10005811
mov eax, dword [ebp + 0x11d8]
mov esi, dword [esp + 0x1c]
cmp eax, edi
mov dword [ebp + 0x11ea], esi
je 0x100055b2
mov edx, dword [ebp + 0x11dc]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebp + 0x11d8]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 0x11d8]
cmp eax, 0xffffffff
je 0x100055ac
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x11d8], edi
push edi
mov byte [ebp + 0x11e8], 0
mov cx, word [ebp + 0x11e8]
push edi
push edi
push edi
push ecx
jmp 0x1000580e
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x1000565b
mov esi, dword [esp + 0x24]
cmp esi, edi
je 0x1000565b
mov edx, dword [esp + 0x1c]
cmp eax, 0x540
mov dword [ebp + 0x11ea], edx
mov byte [ebp + 0x11e8], 1
mov dword [esp + 0x10], 0x540
jne 0x1000560d
mov ecx, 0x150
lea edi, [ebp + 0x11ee]
rep movsd dword es:[edi], dword [esi]
jmp 0x10005623
push eax
lea eax, [esp + 0x14]
push esi
lea ecx, [ebp + 0x11ee]
push eax
push ecx
call fcn.10009f50
add esp, 0x10
mov ecx, 0xa0
xor eax, eax
lea edi, [ebp + 0x14ae]
lea esi, [ebp + 0x122e]
rep stosd dword es:[edi], eax
lea edi, [ebp + 0x172e]
mov ebx, 0xa
push 0x40
push esi
call fcn.10007990
mov dword [edi], eax
add esp, 8
add esi, 0x40
add edi, 4
dec ebx
jne 0x10005643
xor edi, edi
cmp dword [ebp + 0x11d8], edi
jne 0x10005695
cmp dword [ebp + 0xdc8], edi
je 0x10005695
mov edx, dword [ebp + 0x11dc]
push edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [esp + 0x14]
push eax
push edi
push ebp
push 0x10005c50
push edi
push edi
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
mov dword [ebp + 0x11d8], eax
mov cx, word [ebp + 0x11e8]
mov edx, dword [esp + 0x1c]
push edi
push edi
push edi
push edi
push ecx
push 0x14
push edx
jmp 0x10005811
mov eax, dword [ebp + 0x1dc4]
mov byte [ebp + 0x11e9], 0
cmp eax, edi
je 0x100056f2
mov eax, dword [ebp + 0x1dc8]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp + 0x1dc4]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 0x1dc4]
cmp eax, 0xffffffff
je 0x100056ec
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x1dc4], edi
push 0xffffffffffffffff
push edi
mov ecx, ebp
call fcn.10005840
mov dx, word [ebp + 0x11e8]
mov eax, dword [esp + 0x1c]
push edi
push edi
push edi
push edi
push edx
push 0x14
push eax
jmp 0x10005811
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x100057f9
mov esi, dword [esp + 0x24]
cmp esi, edi
je 0x100057f9
mov ecx, dword [esp + 0x1c]
cmp eax, 0x540
mov dword [ebp + 0x11ea], ecx
mov byte [ebp + 0x11e9], 1
mov dword [esp + 0x10], 0x540
jne 0x1000575b
mov ecx, 0x150
lea edi, [ebp + 0x1756]
rep movsd dword es:[edi], dword [esi]
jmp 0x10005771
push eax
lea edx, [esp + 0x14]
push esi
lea eax, [ebp + 0x1756]
push edx
push eax
call fcn.10009f50
add esp, 0x10
lea edi, [ebp + 0x1c96]
lea esi, [ebp + 0x1a16]
mov ebx, 0xa
mov cl, byte [esi - 0x280]
test cl, cl
je 0x100057c2
mov al, byte [esi]
test al, al
je 0x100057a8
and eax, 0xff
lea ecx, [esi + 1]
push eax
push ecx
call fcn.10007990
add esp, 8
mov dword [edi], eax
jmp 0x100057c8
and ecx, 0xff
lea edx, [esi - 0x27f]
push ecx
push edx
call fcn.10007990
add esp, 8
mov dword [edi], eax
jmp 0x100057c8
mov dword [edi], 0
add esi, 0x40
add edi, 4
dec ebx
jne 0x10005782
mov esi, dword [esp + 0x1c]
cmp esi, 0xffffffff
je 0x100057eb
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push eax
push ecx
mov ecx, ebp
call fcn.10005840
mov dword [ebp + 0x1dcc], 1
xor edi, edi
jmp 0x100057fd
mov esi, dword [esp + 0x1c]
cmp esi, 0xffffffff
je case.default.0x10005545
mov dx, word [ebp + 0x11e8]
push edi
push edi
push edi
push edi
push edx
push 0x14
push esi
mov ecx, ebp
call fcn.10004ed0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret 0x10