Function at 0x4fed10
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x5cf927
mov eax, dword fs:[0]
push eax
sub esp, 0x140
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65d4e4]
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 0x4fed52
or eax, 0xffffffff
jmp 0x4ff005
lea edi, [esi + 0x18]
test edi, edi
mov dword [esp + 0x18], edi
je 0x4fed64
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x14], 0
mov dword [esp + 0x15c], 0
jbe 0x4fed8a
test edi, edi
je 0x4fed80
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
jmp 0x4ff005
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.00595ebd
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.00595ebd
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
add esp, 8
test eax, eax
je 0x4fede1
push eax
call fcn.00595eb8
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.00595ebd
mov dword [esi + 0x10], eax
add esp, 4
xor eax, eax
test ebx, ebx
jle 0x4fee21
jmp 0x4fee10
mov ecx, dword [esi + 0x10]
mov dword [ecx + eax*4], 0
add eax, 1
cmp eax, ebx
jl 0x4fee10
test ebx, ebx
mov dword [esi + 0x14], ebx
mov dword [esp + 0x14], 0
jle 0x4feff4
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 0x4fe9e0
push eax
push 0
call fcn.005b5a6d
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 0x4fef24
lea ecx, [esp + 0x5c]
call fcn.0040b040
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.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x58]
call fcn.004094f0
cmp dword [eax + 0x18], ebp
mov byte [esp + 0x15c], 2
jb 0x4feec5
mov eax, dword [eax + 4]
jmp 0x4feec8
add eax, 4
push eax
push str.BaseLib::CTask::Open
push 0x6d
push str..common_task.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x34], ebp
jb 0x4feef9
mov edx, dword [esp + 0x20]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0xa0]
mov byte [esp + 0x15c], 0
call fcn.00409e00
mov dword [esp + 0xa0], vtable.std::ios_base.0
lea eax, [esp + 0xa0]
jmp 0x4fefd8
lea ecx, [esp + 0xdc]
call fcn.0040b040
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx + edi]
push edx
lea eax, [esp + 0xd8]
push 0x5f40b8
push eax
mov byte [esp + 0x168], 3
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0xd8]
call fcn.004094f0
cmp dword [eax + 0x18], ebp
mov byte [esp + 0x15c], 4
jb 0x4fef7e
mov eax, dword [eax + 4]
jmp 0x4fef81
add eax, 4
push eax
push str.BaseLib::CTask::Open
push 0x71
push str..common_task.cpp
push 0x801
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x50], ebp
jb 0x4fefb2
mov edx, dword [esp + 0x3c]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0x120]
mov byte [esp + 0x15c], 0
call fcn.00409e00
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
lea eax, [esp + 0x120]
push eax
call fcn.005cdcde
mov eax, dword [esp + 0x18]
add eax, 1
add esp, 4
cmp eax, ebx
mov dword [esp + 0x14], eax
jl 0x4fee39
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4ff003
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