Function at 0x493870
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x5316d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push ebp
push esi
mov esi, dword [esp + 0x64]
push edi
mov edi, ecx
movsx eax, word [esi]
movsx ebx, word [esi + 4]
movsx ebp, word [esi + 6]
movsx ecx, word [esi + 2]
sub ebx, eax
sub ebp, ecx
movsx eax, word [edi + 6]
mov dword [esp + 0x28], eax
inc ebx
cdq
sub eax, edx
mov edx, dword [edi + 0x1c]
sar eax, 1
inc ebp
mov dword [esp + 0x68], eax
mov eax, dword [0x659a28]
mov dword [esp + 0x14], edx
lea ecx, [ebp + 4]
push eax
push ecx
push ebx
lea ecx, [esp + 0x4c]
call fcn.004a8200
lea ecx, [esp + 0x40]
mov dword [esp + 0x60], 0
call fcn.004a8b90
mov eax, dword [esp + 0x6c]
lea ecx, [ebx - 1]
lea edx, [esp + 0x40]
add eax, eax
mov dword [esp + 0x20], ecx
mov dword [edi + 0x1c], edx
sub ecx, eax
lea edx, [ebp - 1]
mov dword [esp + 0x1c], ecx
mov ecx, edx
sub ecx, eax
mov dword [esp + 0x24], edx
movsx edx, word [esi + 2]
mov dword [esp + 0x18], ecx
movsx ecx, word [esi + 6]
movsx eax, word [esi]
sub ecx, edx
inc ecx
push ecx
movsx ecx, word [esi + 4]
sub ecx, eax
inc ecx
push ecx
push 0
push 0
lea ecx, [esp + 0x44]
call fcn.004b4a60
mov edx, dword [eax]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x2c], edx
lea edx, [esp + 0x2c]
mov eax, dword [eax + 4]
push 1
mov dword [esp + 0x34], eax
lea eax, [ecx + ecx]
inc eax
push edx
push eax
push 0
push 0
mov ecx, edi
mov dword [esp + 0x24], eax
call fcn.00493fc0
movsx eax, word [esi + 6]
movsx ecx, word [esi + 2]
sub eax, ecx
inc eax
push eax
movsx edx, word [esi]
movsx eax, word [esi + 4]
sub eax, edx
lea ecx, [esp + 0x38]
inc eax
push eax
push 0
push 0
call fcn.004b4a60
mov ecx, dword [eax]
push 1
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x14]
mov edx, dword [eax + 4]
lea eax, [esp + 0x30]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
push edx
push 0
mov ecx, edi
call fcn.00493fc0
movsx eax, word [esi + 6]
movsx ecx, word [esi + 2]
movsx edx, word [esi]
sub eax, ecx
lea ecx, [esp + 0x34]
inc eax
push eax
movsx eax, word [esi + 4]
sub eax, edx
inc eax
push eax
push 0
push 0
call fcn.004b4a60
mov ecx, dword [eax]
push 1
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x14]
mov edx, dword [eax + 4]
lea eax, [esp + 0x30]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x24]
push ecx
push edx
push eax
mov ecx, edi
call fcn.00493fc0
movsx ecx, word [esi + 6]
movsx edx, word [esi + 2]
movsx eax, word [esi]
sub ecx, edx
inc ecx
push ecx
movsx ecx, word [esi + 4]
sub ecx, eax
inc ecx
push ecx
push 0
push 0
lea ecx, [esp + 0x44]
call fcn.004b4a60
mov edx, dword [eax]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x10]
mov eax, dword [eax + 4]
push 1
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push 0
push eax
mov ecx, edi
call fcn.00493fc0
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x493a83
push ecx
mov dword [esp + 0x20], esp
mov eax, esp
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push 0
mov dword [eax], 0
call fcn.00411730
push 1
lea ecx, [esp + 0x40]
call fcn.0041b380
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov dword [edi + 0xc], ecx
mov dword [edi + 0x10], edx
mov dword [edi + 0x14], eax
mov ecx, dword [esp + 0x6c]
mov eax, ebx
add ecx, ecx
sub eax, ecx
movsx edx, word [esi + 6]
mov dword [esp + 0x1c], eax
mov eax, ebp
sub eax, ecx
mov dword [esp + 0x18], eax
movsx eax, word [esi + 2]
movsx ecx, word [esi]
sub edx, eax
inc edx
push edx
movsx edx, word [esi + 4]
sub edx, ecx
lea ecx, [esp + 0x38]
inc edx
push edx
push 0
push 0
call fcn.004b4a60
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x68]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x30], edx
lea edx, [esp + 0x2c]
sub eax, ecx
push edx
mov dword [esp + 0x14], eax
push eax
mov eax, dword [esp + 0x24]
push eax
push ecx
mov ecx, dword [esp + 0x7c]
push ecx
mov ecx, edi
call fcn.00492450
movsx edx, word [esi + 6]
movsx eax, word [esi + 2]
movsx ecx, word [esi]
sub edx, eax
inc edx
push edx
movsx edx, word [esi + 4]
sub edx, ecx
lea ecx, [esp + 0x38]
inc edx
push edx
push 0
push 0
call fcn.004b4a60
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x18]
mov edx, dword [eax + 4]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x34], edx
push ecx
mov ecx, dword [esp + 0x30]
mov edx, ebx
sub edx, ecx
mov ecx, dword [esp + 0x70]
push edx
push eax
push ecx
mov ecx, edi
call fcn.00492450
movsx edx, word [esi + 6]
movsx eax, word [esi + 2]
movsx ecx, word [esi]
sub edx, eax
inc edx
push edx
movsx edx, word [esi + 4]
sub edx, ecx
inc edx
push edx
push 0
push 0
lea ecx, [esp + 0x44]
call fcn.004b4a60
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + 4]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x70]
push ecx
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x24]
mov ecx, ebp
sub ecx, eax
push edx
push ecx
push eax
mov ecx, edi
call fcn.00492450
test byte [edi + 4], 0xf
je 0x493c13
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x68]
sub eax, ecx
push edx
push eax
push ecx
mov ecx, edi
mov dword [edi + 0x24], 1
mov dword [esp + 0x34], eax
call fcn.00497170
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x6c]
sub eax, ecx
push eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x70]
sub eax, ecx
mov ecx, edi
push eax
call fcn.004974d0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x68]
sub eax, ecx
mov ecx, dword [esp + 0x6c]
push eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
mov ecx, edi
call fcn.00497170
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
push edx
push eax
push ecx
mov ecx, edi
call fcn.004974d0
mov eax, dword [edi + 0x1c]
xor edx, edx
cmp eax, edx
je 0x493c87
cmp dword [esp + 0x14], edx
je 0x493c87
movsx eax, word [esi + 2]
movsx ecx, word [esi]
mov word [esp + 0x6c], cx
mov word [esp + 0x6e], ax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x6c], eax
mov al, byte [0x8d8105]
test al, 1
jne 0x493c66
or al, 1
push fcn.00402b00
mov byte [0x8d8105], al
mov word [0x8fa7d8], dx
mov word [0x8fa7da], dx
call fcn.0051c6ca
add esp, 4
mov edx, dword [esp + 0x14]
mov eax, dword [edi + 0x1c]
push 0
push 1
push ebp
lea ecx, [esp + 0x78]
push ebx
push ecx
push 0x8fa7d8
push edx
push eax
call fcn.00474b30
add esp, 0x20
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x40]
mov dword [edi + 0x1c], eax
mov dword [esp + 0x60], 0xffffffff
call fcn.004a8ce0
mov ecx, dword [esp + 0x58]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x54
ret 8