Function at 0x50fdc0
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x5dbcf7
mov eax, dword fs:[0]
push eax
sub esp, 0x140
push ebx
push ebp
push esi
push edi
mov eax, dword [0x66d4f4]
xor eax, esp
push eax
lea eax, [esp + 0x154]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [esp + 0x164]
test ebx, ebx
jg 0x50fe02
or eax, 0xffffffff
jmp 0x5100b5
lea edi, [esi + 0x18]
test edi, edi
mov dword [esp + 0x18], edi
je 0x50fe14
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x14], 0
mov dword [esp + 0x15c], 0
jbe 0x50fe3a
test edi, edi
je 0x50fe30
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
jmp 0x5100b5
xor ecx, ecx
mov eax, ebx
mov edx, 4
mul edx
seto cl
mov dword [esi + 4], 1
neg ecx
or ecx, eax
push ecx
call fcn.005a1b18
mov dword [esi + 8], eax
xor ecx, ecx
mov eax, ebx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005a1b18
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
add esp, 8
test eax, eax
je 0x50fe91
push eax
call fcn.005a1b1d
add esp, 4
mov dword [esi + 0x10], 0
xor ecx, ecx
mov eax, ebx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005a1b18
mov dword [esi + 0x10], eax
add esp, 4
xor eax, eax
test ebx, ebx
jle 0x50fed1
jmp 0x50fec0
mov ecx, dword [esi + 0x10]
mov dword [ecx + eax*4], 0
add eax, 1
cmp eax, ebx
jl 0x50fec0
test ebx, ebx
mov dword [esi + 0x14], ebx
mov dword [esp + 0x14], 0
jle 0x5100a4
mov ebp, 0x10
mov edi, dword [esp + 0x14]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x34]
add edi, edi
add edi, edi
add edx, edi
push edx
push 0
push esi
push 0x50fa90
push eax
push 0
call fcn.005c2a65
mov ecx, dword [esi + 8]
add esp, 0x18
mov dword [edi + ecx], eax
mov edx, dword [esi + 8]
cmp dword [edi + edx], 0
push 1
push 2
jne 0x50ffd4
lea ecx, [esp + 0x5c]
call fcn.0040a750
mov byte [esp + 0x15c], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x58]
push str._beginthreadex__error
push eax
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x58]
call fcn.00408c00
cmp dword [eax + 0x18], ebp
mov byte [esp + 0x15c], 2
jb 0x50ff75
mov eax, dword [eax + 4]
jmp 0x50ff78
add eax, 4
push eax
push str.BaseLib::CTask::Open
push 0x6d
push str..common_task.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x34], ebp
jb 0x50ffa9
mov edx, dword [esp + 0x20]
push edx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0xa0]
mov byte [esp + 0x15c], 0
call fcn.00409510
mov dword [esp + 0xa0], vtable.std::ios_base.0
lea eax, [esp + 0xa0]
jmp 0x510088
lea ecx, [esp + 0xdc]
call fcn.0040a750
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx + edi]
push edx
lea eax, [esp + 0xd8]
push 0x601998
push eax
mov byte [esp + 0x168], 3
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0xd8]
call fcn.00408c00
cmp dword [eax + 0x18], ebp
mov byte [esp + 0x15c], 4
jb 0x51002e
mov eax, dword [eax + 4]
jmp 0x510031
add eax, 4
push eax
push str.BaseLib::CTask::Open
push 0x71
push str..common_task.cpp
push 0x801
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x50], ebp
jb 0x510062
mov edx, dword [esp + 0x3c]
push edx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0x120]
mov byte [esp + 0x15c], 0
call fcn.00409510
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
lea eax, [esp + 0x120]
push eax
call fcn.005d9cc4
mov eax, dword [esp + 0x18]
add eax, 1
add esp, 4
cmp eax, ebx
mov dword [esp + 0x14], eax
jl 0x50fee9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x5100b3
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [esp + 0x154]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret 8