Function at 0x4896f8
Capabilities:
Access peb ldr_data
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5f34fe
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edx, dword [ebx]
mov esi, ecx
mov eax, dword [esi + 8]
sub eax, dword [esi]
mov ecx, dword [esi + 0xc]
sub ecx, dword [esi + 4]
push 0x3f3
mov dword [esp + 0x18], eax
mov eax, dword [edx + 0x74]
push ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x20], ecx
call eax
mov ecx, dword [ebx]
mov edx, dword [ecx + 0x74]
push 0x3f4
push ebx
mov dword [esp + 0x34], eax
call edx
mov dword [esp + 0x38], eax
mov eax, dword [ebx]
mov ecx, dword [eax + 0x6c]
push 0x3f2
push ebx
call ecx
movsx edi, ax
shr eax, 0x10
cwde
movsx ecx, dx
shr edx, 0x10
mov dword [esp + 0x34], eax
movsx eax, dx
add eax, dword [esp + 0x34]
add ecx, edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
sub eax, ecx
mov edx, 0
sets dl
mov dword [esp + 0x4c], edi
mov edi, dword [ebx + 0x2c]
mov dword [esp + 0x3c], ecx
dec edx
and edx, eax
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x1c]
mov dword [esp + 0x14], edx
mov edx, 0
sets dl
sub edi, ecx
dec edx
and edx, eax
mov eax, dword [ebx + 0x30]
sub eax, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x48], eax
cmp dword [esp + 0x14], edi
jg 0x4897e9
mov dword [esp + 0x14], edi
cmp edx, eax
jg 0x4897f1
mov dword [esp + 0x18], eax
mov ecx, 3
cmp dword [esp + 0x2c], ecx
je 0x489800
mov dword [esp + 0x14], edi
cmp dword [esp + 0x38], ecx
je 0x48980a
mov dword [esp + 0x18], eax
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, ebx
call fcn.00485ba7
mov eax, dword [esp + 0x20]
mov ecx, edi
cmp edi, eax
jg 0x489827
mov ecx, eax
cmp dword [esp + 0x14], ecx
jl 0x489839
mov dword [esp + 0x14], edi
cmp edi, eax
jg 0x489839
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x24]
mov ecx, eax
cmp eax, edi
jg 0x489849
mov ecx, edi
cmp dword [esp + 0x18], ecx
jl 0x48985b
mov dword [esp + 0x18], eax
cmp eax, edi
jg 0x48985b
mov dword [esp + 0x18], edi
mov eax, dword [ebx + 0x28]
mov edx, dword [eax]
mov edx, dword [edx + 0x24]
lea ecx, [esp + 0x14]
push ecx
push eax
call edx
test eax, eax
js 0x489a20
mov eax, dword [ebx + 0x28]
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [ecx + 0x2c]
call eax
test eax, eax
js 0x489a20
mov eax, dword [ebx + 0x34]
mov edx, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x38]
mov dword [esp + 0x58], eax
add eax, edx
mov dword [esp + 0x60], eax
mov eax, dword [ebx + 0x40]
mov dword [esp + 0x5c], ecx
add ecx, eax
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0x14]
cmp edx, ecx
mov edx, dword [esp + 0x18]
jne 0x4898c3
mov dword [esp + 0x44], 0
cmp eax, edx
je 0x4898cb
mov dword [esp + 0x44], 1
mov eax, dword [esp + 0x20]
mov dword [ebx + 0x3c], ecx
mov dword [ebx + 0x40], edx
mov dword [esp + 0x20], ecx
cmp ecx, eax
jl 0x4898e1
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
cmp edx, edi
jl 0x4898ed
mov dword [esp + 0x24], edi
mov eax, dword [esi + 8]
sub eax, dword [esi]
mov edx, 0
sub eax, dword [esp + 0x3c]
mov ecx, 0
sets dl
lea edi, [esp + 0x3c]
dec edx
and edx, eax
mov eax, dword [esi + 0xc]
sub eax, dword [esi + 4]
mov dword [esp + 0x3c], edx
sub eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x38]
sets cl
push edx
mov edx, dword [esp + 0x30]
lea esi, [esp + 0x24]
dec ecx
and ecx, eax
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x30]
call fcn.00489d6f
mov edx, dword [esp + 0x28]
mov eax, dword [edx]
add eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x44]
add eax, dword [esp + 0x4c]
mov dword [ebx + 0x34], eax
mov eax, edx
mov ecx, dword [eax + 4]
add ecx, dword [esp + 0x30]
xor eax, eax
add ecx, dword [esp + 0x34]
mov dword [ebx + 0x38], ecx
cmp edi, eax
je 0x4899bc
mov dword [esp + 0x1c], eax
mov dword [esp + 0x88], eax
mov edx, dword [ebx]
mov eax, dword [edx + 0x238]
mov ecx, ebx
call eax
push eax
push 0x13e5
push 0x85
lea esi, [esp + 0x28]
call fcn.00489e0b
mov edx, dword [esp + 0x28]
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x14c]
add esp, 0xc
push edx
push ebx
call eax
mov dword [esp + 0x88], 0xffffffff
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4899bc
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebx + 0x34]
mov edx, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x38]
add edx, eax
mov dword [esp + 0x70], edx
mov edx, dword [ebx + 0x40]
add edx, ecx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x74], edx
test edi, edi
jne 0x4899ee
cmp dword [esp + 0x58], eax
jne 0x4899ee
mov eax, ecx
cmp dword [esp + 0x5c], eax
je 0x489a1e
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x489a1e
mov ecx, dword [ebx + 0x20]
test ecx, ecx
je 0x489a1e
mov edx, dword [eax]
lea esi, [esp + 0x58]
push esi
push ecx
push eax
mov eax, dword [edx + 0x30]
call eax
mov eax, dword [ebx + 0x24]
mov ecx, dword [eax]
lea edx, [esp + 0x68]
push edx
mov edx, dword [ebx + 0x20]
push edx
push eax
mov eax, dword [ecx + 0x30]
call eax
xor eax, eax
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.00403fc1
mov esp, ebp
pop ebp
ret 4