Function at 0x4ca140
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 0x38], ecx
cmp dword [ebp - 0x38], 0
je 0x4ca15c
mov eax, dword [ebp - 0x38]
sub eax, 0x3e0
mov dword [ebp - 0x3c], eax
jmp 0x4ca163
mov dword [ebp - 0x3c], 0
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x20]
call edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x14]
mov eax, dword [edx + 0x16c]
call eax
push eax
lea ecx, [ebp - 4]
call fcn.0041c880
push ecx
mov ecx, esp
lea edx, [ebp - 4]
push edx
call fcn.0041c880
mov ecx, dword [ebp - 0x38]
call fcn.004da990
mov dword [ebp - 0x18], 0
jmp 0x4ca1b8
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x38]
add ecx, 0x8c
call fcn.004d7a40
cmp dword [ebp - 0x18], eax
jae 0x4ca239
push 0
mov ecx, dword [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0x38]
add ecx, 0x8c
call fcn.004d7a60
add eax, 4
mov ecx, eax
call fcn.0041cb20
push eax
lea ecx, [ebp - 4]
call fcn.004a5a90
test eax, eax
jl 0x4ca234
mov edx, dword [ebp - 0x18]
push edx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2c]
push ecx
mov ecx, dword [ebp - 0x38]
add ecx, 0x8c
call fcn.004d7a10
mov ecx, eax
call fcn.004e2a80
mov edx, dword [eax]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
push eax
lea ecx, [ebp - 0x34]
push ecx
mov ecx, dword [ebp - 0x38]
add ecx, 0x8c
call fcn.004d7a80
jmp 0x4ca239
jmp 0x4ca1af
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x80]
mov ecx, dword [ebp - 0x38]
mov ecx, dword [ecx + 0x80]
mov edx, dword [eax]
mov eax, dword [edx + 0xc]
call eax
mov dword [ebp - 8], eax
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x1c], 0
jmp 0x4ca26b
mov ecx, dword [ebp - 0x1c]
add ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 8]
jge 0x4ca2ea
lea ecx, [ebp - 0x20]
call fcn.0040ee90
movzx eax, byte [ebp - 0xd]
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0xd], al
movzx ecx, byte [ebp - 0xd]
neg ecx
sbb ecx, ecx
neg ecx
push ecx
push 0x593da0
lea edx, [ebp - 0x20]
push edx
call fcn.004ea900
add esp, 0xc
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x80]
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x80]
mov edx, dword [edx]
mov eax, dword [edx]
call eax
mov dword [ebp - 0x40], eax
lea ecx, [ebp - 0x20]
call fcn.0041cb20
push eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x40]
mov eax, dword [edx + 0x84]
call eax
lea ecx, [ebp - 0x20]
call fcn.0040f740
jmp 0x4ca262
cmp dword [ebp - 8], 1
jne 0x4ca369
mov ecx, dword [ebp - 0x38]
movzx edx, byte [ecx + 0x34]
test edx, edx
jne 0x4ca369
push 0x582b94
mov ecx, dword [ebp - 0x38]
add ecx, 0x1c
call fcn.0041cec0
push 0x582b94
mov ecx, 0x5c2790
call fcn.0041cec0
push 0x582b94
mov ecx, 0x5c2794
call fcn.0041cec0
push 0x582b94
mov ecx, 0x5c2798
call fcn.0041cec0
push 0x582b94
mov ecx, 0x5c27a0
call fcn.0041cec0
push 0x582b94
mov ecx, 0x5c27a4
call fcn.0041cec0
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0x4b9300
call fcn.00547a7d
add esp, 0xc
lea ecx, [ebp - 4]
call fcn.0040f740
mov esp, ebp
pop ebp
ret 0xc