Function at 0x487f10
Capabilities:
Check for peb beingdebugged flag
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5bc1a8
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x669404]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x669404]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x44], eax
mov byte [esp + 0x13], bl
call fcn.00548290
mov dword [esp + 0x78], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov byte [esp + 0x78], 1
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov byte [esp + 0x78], 2
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov byte [esp + 0x78], 3
mov edi, dword [esi + 0x10]
lea ecx, [esp + 0x24]
mov dword [esp + 0x48], edi
call fcn.00549170
mov byte [esp + 0x78], 4
push 0xa
call fcn.00543310
add esp, 4
push eax
lea esi, [esp + 0x38]
call fcn.004887f0
movzx ecx, byte [0x66ba88]
mov eax, dword [esp + 0x34]
mov byte [eax], cl
movzx edx, byte [0x66ba89]
mov byte [eax + 1], dl
movzx ecx, byte [0x66ba8a]
mov byte [eax + 2], cl
movzx edx, byte [0x66ba8b]
mov byte [eax + 3], dl
movzx ecx, byte [0x66ba8c]
mov byte [eax + 4], cl
movzx edx, byte [0x66ba8d]
mov byte [eax + 5], dl
movzx ecx, byte [0x66ba8e]
mov byte [eax + 6], cl
movzx edx, byte [0x66ba8f]
mov byte [eax + 7], dl
movzx ecx, byte [0x66ba90]
mov byte [eax + 8], cl
movzx edx, byte [0x66ba91]
push 0xa
push eax
lea ecx, [esp + 0x44]
mov byte [eax + 9], dl
call fcn.00548b50
lea edi, [edi + edi + 4]
push edi
call fcn.00543310
add esp, 4
push eax
lea esi, [esp + 0x30]
call fcn.004887f0
push edi
lea ecx, [esp + 0x40]
call fcn.00548f50
push eax
call fcn.00543310
add esp, 4
push eax
lea esi, [esp + 0x18]
call fcn.004887f0
mov esi, dword [esp + 0x2c]
cmp esi, ebx
je 0x488154
cmp dword [esp + 0x14], ebx
je 0x488154
mov ecx, dword [esp + 0x48]
mov dword [esi], ecx
cmp ecx, ebx
je 0x48809a
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x14], 8
jb 0x48808a
mov eax, dword [eax]
add ecx, ecx
push ecx
push eax
lea edx, [esi + 4]
push edx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0x14]
push edi
push eax
push esi
lea ecx, [esp + 0x48]
call fcn.00548f70
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea ecx, [esp + 0x2c]
call fcn.005491d0
test eax, eax
je 0x488154
lea ecx, [esp + 0x24]
call fcn.005496d0
lea ecx, [esp + 0x24]
mov esi, eax
call fcn.00549190
mov edx, dword [sym.imp.MSVCR100.dll_free]
push edx
push eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call fcn.004888a0
mov byte [esp + 0x78], 5
mov edx, dword [esp + 0x1c]
push esi
lea ecx, [esp + 0x50]
call fcn.0041e150
add esp, 4
mov byte [esp + 0x78], 6
mov esi, dword [esp + 0x44]
mov edi, eax
call fcn.00406850
mov byte [esp + 0x78], 5
cmp dword [esp + 0x60], 8
jb 0x48812e
mov eax, dword [esp + 0x4c]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ecx, ecx
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], cx
mov byte [esp + 0x13], 1
mov byte [esp + 0x78], 4
lea eax, [esp + 0x1c]
call fcn.00470360
mov byte [esp + 0x78], 3
lea ecx, [esp + 0x24]
call fcn.005491a0
mov byte [esp + 0x78], 2
mov esi, dword [esp + 0x18]
cmp esi, ebx
je 0x488198
lea edx, [esi + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x488198
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x488198
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
mov byte [esp + 0x78], 1
mov esi, dword [esp + 0x30]
cmp esi, ebx
je 0x4881ce
lea eax, [esi + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4881ce
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4881ce
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
mov byte [esp + 0x78], bl
mov esi, dword [esp + 0x38]
cmp esi, ebx
je 0x488203
lea eax, [esi + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x488203
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x488203
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
mov dword [esp + 0x78], 0xffffffff
lea ecx, [esp + 0x3c]
call fcn.005482b0
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.00546bdc
mov esp, ebp
pop ebp
ret