Function at 0x40ba4c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x6ac]
add esi, 0x2e0
call fcn.004043c3
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x74c]
mov eax, dword [eax + 0x1b60]
push 0x4134d0
mov dword [edi + 0x6f8], eax
push 1
mov eax, edi
mov dword [esp + 0x2c], 0x20
call fcn.00401c53
lea eax, [esp + 0x54]
call fcn.00407500
mov ebx, eax
call fcn.0040757e
xor ebx, ebx
cmp dword [esp + 0x7c], ebx
jle 0x40baf0
mov eax, ebx
lea ecx, [esp + 0x70]
call fcn.00403395
mov esi, eax
call fcn.0040720b
test eax, eax
je 0x40bae9
mov eax, dword [esi + 8]
cmp byte [eax + 0x1d8], 0
je 0x40bae9
cmp dword [eax + 0x1a0], 0x47
je 0x40bc1e
inc ebx
cmp ebx, dword [esp + 0x7c]
jl 0x40baba
and dword [esp + 0x10], 0
cmp dword [esp + 0x10], 0
jne 0x40bb09
lea esi, [esp + 0x54]
call fcn.00407a0a
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x74c]
xor ecx, ecx
cmp dword [eax + 0xf8], ecx
je 0x40bb5f
cmp dword [esp + 0x7c], ecx
lea esi, [eax + 0xfc]
mov dword [esp + 0x10], ecx
jle 0x40bb5a
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x70]
call fcn.00403395
mov ebx, eax
lea eax, [ebx + 0xc]
push esi
push eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
pop ecx
pop ecx
je 0x40bc27
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x7c]
jl 0x40bb29
and dword [esp + 0x10], 0
mov eax, dword [edi + 0x74c]
cmp dword [eax + 0x2fc], 0
je 0x40bcfd
mov eax, dword [edi + 0x208]
lea ebx, [edi + 0x6bc]
lea esi, [ebx + 0x40]
mov dword [ebx + 0x30], eax
call fcn.004043c3
xor eax, eax
cmp dword [esp + 0x7c], eax
mov dword [esp + 0x18], eax
jle 0x40bca5
lea ecx, [esp + 0x70]
call fcn.00403395
mov eax, dword [eax + 8]
test eax, eax
je 0x40bc92
lea esi, [eax + 0x1ac]
push 0xa
pop ecx
lea edi, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
xor edi, edi
push edi
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x48]
push eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], edi
call fcn.0040735e
add esp, 0xc
test eax, eax
je 0x40bc30
push 1
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.0040735e
add esp, 0xc
test eax, eax
je 0x40bc30
mov ecx, dword [esp + 0x10]
and ecx, dword [esp + 0x14]
call fcn.00407257
mov ecx, dword [esp + 0x10]
mov esi, eax
call fcn.00407257
not eax
add esi, eax
mov ecx, esi
call fcn.00407257
mov dword [esp + 0x10], eax
jmp 0x40bc34
mov dword [esp + 0x10], esi
jmp 0x40baf5
mov dword [esp + 0x10], ebx
jmp 0x40bb5f
mov dword [esp + 0x10], edi
cmp dword [esp + 0x10], edi
je 0x40bc83
mov edx, dword [esp + 0x28]
cmp edx, edi
mov esi, edx
jl 0x40bc83
cmp edx, 0xffffffff
jne 0x40bc54
push dword [esp + 0x1c]
call sub.msvcrt.dll_free
jmp 0x40bc6a
push dword [esp + 0x24]
lea eax, [esp + 0x24]
push 4
lea edi, [esp + 0x24]
call fcn.00405936
pop ecx
xor edi, edi
lea eax, [esi + 1]
cmp dword [esp + 0x2c], eax
pop ecx
jge 0x40bc78
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov dword [ecx + esi*4], eax
mov esi, dword [esp + 0x2c]
cmp esi, edi
jne 0x40bbb3
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x18]
inc eax
cmp eax, dword [esp + 0x7c]
mov dword [esp + 0x18], eax
jl 0x40bb99
lea eax, [esp + 0x18]
push eax
mov eax, dword [edi + 0x74c]
add eax, 0x74
xor esi, esi
push eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
call fcn.004072ad
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi + 0x74c]
add eax, 0xb6
push eax
call fcn.004072ad
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
add esp, 0x10
push dword [esp + 0x28]
push dword [esp + 0x1c]
push ebx
call fcn.0040fd92
mov edi, dword [ebp + 8]
cmp dword [edi + 0x708], esi
jmp 0x40bd3b
cmp dword [esp + 0x10], 0
je 0x40bd62
mov eax, dword [edi + 0x208]
lea ebx, [edi + 0x6bc]
lea esi, [ebx + 0x40]
mov dword [ebx + 0x30], eax
call fcn.004043c3
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 8]
lea ecx, [eax + 0x1d4]
push ecx
add eax, 0x1ac
push ebx
call fcn.0040fd20
cmp dword [edi + 0x708], 0
mov eax, dword [edi + 0x74c]
mov eax, dword [eax + 0x1b60]
mov dword [edi + 0x6f8], eax
jne 0x40bd5a
mov eax, edi
call fcn.0040ba36
test eax, eax
jne 0x40bd6d
push ebx
call fcn.0040ff6c
jmp 0x40bd72
mov eax, edi
call fcn.0040ba36
test eax, eax
je 0x40bd72
call fcn.0040cff6
push 0
mov esi, edi
call fcn.0040b357
mov eax, dword [edi + 0x74c]
xor ebx, ebx
cmp dword [eax + 0x1ba4], ebx
je 0x40bdbb
mov esi, dword [edi + 0x6ac]
call fcn.00405c17
test eax, eax
je 0x40bdbb
lea eax, [esp + 0x18]
push eax
push ebx
add esi, 0x2f0
push esi
push 0x4071f1
push ebx
push ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [esi + 0x1c], eax
lea eax, [esp + 0x54]
mov dword [edi + 0x744], 1
call fcn.0040752c
cmp dword [esp + 0x1c], ebx
je 0x40bdde
push dword [esp + 0x1c]
call sub.msvcrt.dll_free
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4