Function at 0x40f520
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x4c1b14
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x18], esi
xor ebx, ebx
lea edi, [esi + 8]
mov dword [esi], 0x4c89dc
mov dword [esp + 0x24], ebx
mov dword [edi], ebx
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov eax, dword [0x520868]
mov ecx, 0x520868
mov byte [esp + 0x24], 1
lea ebp, [esi + 0x20]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp], eax
mov edx, dword [0x520868]
mov ecx, 0x520868
mov byte [esp + 0x24], 2
call dword [edx + 0xc]
add eax, 0x10
mov dword [esi + 0x24], eax
push 0x3c
mov byte [esp + 0x28], 3
mov dword [esi + 4], 1
call fcn.004a0b52
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, ebx
mov byte [esp + 0x24], 4
je 0x40f5b9
mov ecx, eax
call fcn.0040ead0
jmp 0x40f5bb
xor eax, eax
push eax
mov ecx, edi
mov byte [esp + 0x28], 3
call fcn.00409e00
mov eax, 1
mov ecx, 0x4ffdbb
mov dword [esi + 0x14], 2
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
call fcn.0040d550
mov eax, dword [0x4ffb58]
mov eax, dword [eax + 0x2c]
mov ecx, dword [eax]
cmp ecx, ebx
jne 0x40f609
push 0x4d6aec
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x18], 0x4c824c
call fcn.004a0e32
mov edx, dword [eax + 8]
cmp edx, ebx
jne 0x40f614
xor edi, edi
jmp 0x40f617
mov edi, dword [edx + 0x10]
mov eax, dword [eax + 4]
cmp eax, edi
jb 0x40f635
push 0x4d6adc
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], 0x4c8250
call fcn.004a0e32
cmp edx, ebx
je 0x40f63e
mov edx, dword [edx + 0xc]
jmp 0x40f640
xor edx, edx
imul eax, edx
mov edi, dword [eax + ecx + 0x28]
add eax, ecx
cmp edi, ebx
jne 0x40f651
xor eax, eax
jmp 0x40f65f
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40f656
sub eax, edx
push eax
push edi
mov ecx, ebp
call fcn.00404360
mov ecx, 0x4ffdbb
call fcn.0040d550
mov eax, dword [0x4ffb58]
mov eax, dword [eax + 0x2c]
mov ecx, dword [eax]
cmp ecx, ebx
jne 0x40f697
push 0x4d6aec
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x4c824c
call fcn.004a0e32
mov edx, dword [eax + 8]
cmp edx, ebx
jne 0x40f6a2
xor edi, edi
jmp 0x40f6a5
mov edi, dword [edx + 0x10]
mov eax, dword [eax + 4]
cmp eax, edi
jb 0x40f6c3
push 0x4d6adc
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], 0x4c8250
call fcn.004a0e32
cmp edx, ebx
je 0x40f6cc
mov edx, dword [edx + 0xc]
jmp 0x40f6ce
xor edx, edx
imul eax, edx
mov edi, dword [eax + ecx + 0x2c]
add eax, ecx
cmp edi, ebx
jne 0x40f6df
xor eax, eax
jmp 0x40f6ed
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40f6e4
sub eax, edx
push eax
push edi
lea ecx, [esi + 0x24]
call fcn.00404360
mov ebp, 1
mov ecx, 0x4ffdbb
mov dword [esi + 0x28], ebp
mov dword [esi + 0x2c], ebp
call fcn.0040d550
mov eax, dword [0x4ffb58]
mov eax, dword [eax + 0x2c]
mov ecx, dword [eax]
cmp ecx, ebx
jne 0x40f731
push 0x4d6aec
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x4c824c
call fcn.004a0e32
mov edx, dword [eax + 8]
cmp edx, ebx
jne 0x40f73c
xor edi, edi
jmp 0x40f73f
mov edi, dword [edx + 0x10]
mov eax, dword [eax + 4]
cmp eax, edi
jb 0x40f75d
push 0x4d6adc
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], 0x4c8250
call fcn.004a0e32
cmp edx, ebx
je 0x40f766
mov edx, dword [edx + 0xc]
jmp 0x40f768
xor edx, edx
imul eax, edx
add eax, ecx
mov eax, dword [eax + 0x58]
mov ecx, dword [eax]
mov dword [esi + 0x30], ecx
mov ecx, 0x4ffdbb
call fcn.0040d550
mov edx, dword [0x4ffb58]
mov eax, dword [edx + 0x2c]
mov ecx, dword [eax]
cmp ecx, ebx
jne 0x40f7a5
push 0x4d6aec
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0x4c824c
call fcn.004a0e32
mov edx, dword [eax + 8]
cmp edx, ebx
jne 0x40f7b0
xor edi, edi
jmp 0x40f7b3
mov edi, dword [edx + 0x10]
mov eax, dword [eax + 4]
cmp eax, edi
jb 0x40f7d1
push 0x4d6adc
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x18], 0x4c8250
call fcn.004a0e32
cmp edx, ebx
je 0x40f7da
mov edx, dword [edx + 0xc]
jmp 0x40f7dc
xor edx, edx
imul eax, edx
mov edx, dword [eax + ecx + 0x58]
add eax, ecx
mov eax, dword [edx + 8]
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], ebp
mov dword [esi + 0x3c], ebp
mov dword [esi + 0x40], ebp
mov dword [esi + 0x68], ebx
mov dword [esi + 0x48], ebp
mov dword [esi + 0x50], ebx
mov dword [esi + 0x54], ebx
mov dword [esi + 0x58], ebp
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x44], 2
mov dword [esi + 0x4c], 0xffffffff
xor ecx, ecx
lea eax, [esi + 0x6c]
mov edx, eax
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov dword [edx + 0x10], ecx
mov dword [edx + 0x14], ecx
mov dword [edx + 0x18], ecx
mov dword [edx + 0x1c], ecx
mov dword [edx + 0x20], ecx
mov dword [edx + 0x24], ecx
mov dword [edx + 0x28], ecx
mov dword [edx + 0x2c], ecx
mov dword [edx + 0x30], ecx
mov dword [edx + 0x34], ecx
mov dword [edx + 0x38], ecx
mov dword [edx + 0x3c], ecx
mov ecx, dword [esp + 0x1c]
mov word [eax], bx
pop edi
mov word [esi + 0x6e], 0xffff
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret