Function at 0x406880
Capabilities:
Access peb ldr_data
Get kernel32 base address
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4baac0
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push esi
push edi
mov eax, dword [0x4d437c]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov eax, 0xfffffe00
and dword [esp + 0x34], eax
mov byte [esp + 0x13], cl
mov dword [esp + 0x38], ecx
mov dword [esp + 0x88], 1
and dword [esp + 0x44], eax
mov dword [esp + 0x48], ecx
mov edx, dword [esp + 0x24]
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
and edx, 0xffffff01
or edx, 1
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], eax
push 0x4beb1c
lea ebx, [esp + 0x30]
mov byte [esp + 0x8c], 4
call fcn.004b11a0
mov esi, eax
lea eax, [esp + 0x1c]
call fcn.004b07c0
lea eax, [esp + 0x1c]
mov byte [esp + 0x88], 3
call fcn.004b0720
mov ecx, dword [esp + 0x24]
mov eax, dword [edi + 8]
and ecx, 0xffffff01
or ecx, 1
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x1c], eax
push 0x4beb18
mov byte [esp + 0x8c], 5
call fcn.004b11a0
mov esi, eax
lea eax, [esp + 0x1c]
call fcn.004b07c0
lea eax, [esp + 0x1c]
mov byte [esp + 0x88], 3
call fcn.004b0720
mov eax, dword [edi + 0x10]
mov eax, dword [eax]
add edi, 0xc
mov ebx, eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebx
lea ebx, [ebx]
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x10]
add eax, 0xc
test edi, edi
je 0x4069a1
cmp edi, eax
je 0x4069a7
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, esi
je 0x406b19
test edi, edi
mov esi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
jne 0x4069bb
call esi
cmp ebx, dword [edi + 4]
jne 0x4069c2
call esi
mov eax, dword [ebx + 0x30]
sub eax, 0
je 0x406a99
sub eax, 1
je 0x406a3a
sub eax, 1
jne 0x406b03
cmp ebx, dword [edi + 4]
jne 0x4069e3
call esi
cmp dword [ebx + 0x58], 0x10
jb 0x4069ee
mov eax, dword [ebx + 0x44]
jmp 0x4069f1
lea eax, [ebx + 0x44]
push eax
lea esi, [esp + 0x70]
call fcn.004b04e0
mov byte [esp + 0x88], 8
cmp ebx, dword [edi + 4]
jne 0x406a0e
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [ebx + 0x28], 0x10
jb 0x406a19
mov ebx, dword [ebx + 0x14]
jmp 0x406a1c
add ebx, 0x14
push ebx
lea ebx, [esp + 0x30]
call fcn.004b11a0
mov esi, eax
lea eax, [esp + 0x6c]
call fcn.004b07c0
lea eax, [esp + 0x6c]
jmp 0x406af6
cmp ebx, dword [edi + 4]
jne 0x406a41
call esi
mov edx, dword [esp + 0x54]
mov eax, dword [ebx + 0x38]
and edx, 0xffffff01
or edx, 1
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], 0
mov dword [esp + 0x4c], eax
mov byte [esp + 0x88], 7
cmp ebx, dword [edi + 4]
jne 0x406a70
call esi
cmp dword [ebx + 0x28], 0x10
jb 0x406a7b
mov ebx, dword [ebx + 0x14]
jmp 0x406a7e
add ebx, 0x14
push ebx
lea ebx, [esp + 0x30]
call fcn.004b11a0
mov esi, eax
lea eax, [esp + 0x4c]
call fcn.004b07c0
lea eax, [esp + 0x4c]
jmp 0x406af6
cmp ebx, dword [edi + 4]
jne 0x406aa0
call esi
mov ecx, dword [esp + 0x64]
mov eax, dword [ebx + 0x38]
and ecx, 0xffffff01
or ecx, 1
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], 0
mov dword [esp + 0x5c], eax
mov byte [esp + 0x88], 6
cmp ebx, dword [edi + 4]
jne 0x406acf
call esi
cmp dword [ebx + 0x28], 0x10
jb 0x406ada
mov ebx, dword [ebx + 0x14]
jmp 0x406add
add ebx, 0x14
push ebx
lea ebx, [esp + 0x30]
call fcn.004b11a0
mov esi, eax
lea eax, [esp + 0x5c]
call fcn.004b07c0
lea eax, [esp + 0x5c]
mov byte [esp + 0x88], 3
call fcn.004b0720
lea esi, [esp + 0x1c]
call fcn.00408fc0
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
jmp 0x406990
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
test ecx, ecx
jbe 0x406d31
lea ecx, [eax + 0x18]
mov eax, dword [ecx + 4]
mov eax, dword [eax]
mov ebx, ecx
mov esi, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], esi
nop
test ebx, ebx
mov edi, dword [ecx + 4]
je 0x406b4b
cmp ebx, ecx
je 0x406b51
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, edi
je 0x406d18
test ebx, ebx
mov edi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
jne 0x406b65
call edi
cmp esi, dword [ebx + 4]
jne 0x406b6c
call edi
mov eax, dword [esi + 0x30]
sub eax, 0
je 0x406c94
sub eax, 1
je 0x406c35
sub eax, 1
jne 0x406cfe
cmp esi, dword [ebx + 4]
jne 0x406b91
call edi
cmp dword [esi + 0x58], 0x10
jb 0x406b9c
mov edi, dword [esi + 0x44]
jmp 0x406b9f
lea edi, [esi + 0x44]
mov edx, dword [esp + 0x64]
and edx, 0xffffff04
or edx, 0x104
test byte [0x4d7130], 1
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], 0
jne 0x406be2
or dword [0x4d7130], 1
push 0x4bc720
mov dword [0x4d6e80], 0x4cbddc
call fcn.004b779a
add esp, 4
mov ecx, dword [0x4d631c]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
push 0xffffffffffffffff
push edi
call edx
mov dword [esp + 0x5c], eax
mov byte [esp + 0x88], 0xb
cmp esi, dword [ebx + 4]
jne 0x406c09
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [esi + 0x28], 0x10
jb 0x406c14
mov esi, dword [esi + 0x14]
jmp 0x406c17
add esi, 0x14
push esi
lea ebx, [esp + 0x40]
call fcn.004b11a0
mov esi, eax
lea eax, [esp + 0x5c]
call fcn.004b07c0
lea eax, [esp + 0x5c]
jmp 0x406cf1
cmp esi, dword [ebx + 4]
jne 0x406c3c
call edi
mov ecx, dword [esp + 0x54]
mov eax, dword [esi + 0x38]
and ecx, 0xffffff01
or ecx, 1
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], 0
mov dword [esp + 0x4c], eax
mov byte [esp + 0x88], 0xa
cmp esi, dword [ebx + 4]
jne 0x406c6b
call edi
cmp dword [esi + 0x28], 0x10
jb 0x406c76
mov esi, dword [esi + 0x14]
jmp 0x406c79
add esi, 0x14
push esi
lea ebx, [esp + 0x40]
call fcn.004b11a0
mov esi, eax
lea eax, [esp + 0x4c]
call fcn.004b07c0
lea eax, [esp + 0x4c]
jmp 0x406cf1
cmp esi, dword [ebx + 4]
jne 0x406c9b
call edi
mov edx, dword [esp + 0x74]
mov eax, dword [esi + 0x38]
and edx, 0xffffff01
or edx, 1
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], 0
mov dword [esp + 0x6c], eax
mov byte [esp + 0x88], 9
cmp esi, dword [ebx + 4]
jne 0x406cca
call edi
cmp dword [esi + 0x28], 0x10
jb 0x406cd5
mov esi, dword [esi + 0x14]
jmp 0x406cd8
add esi, 0x14
push esi
lea ebx, [esp + 0x40]
call fcn.004b11a0
mov esi, eax
lea eax, [esp + 0x6c]
call fcn.004b07c0
lea eax, [esp + 0x6c]
mov byte [esp + 0x88], 3
call fcn.004b0720
lea esi, [esp + 0x1c]
call fcn.00408fc0
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
jmp 0x406b40
push str.ptnlcrisvwoum
lea ebx, [esp + 0x30]
call fcn.004b11a0
mov esi, eax
lea eax, [esp + 0x3c]
call fcn.004b07c0
test byte [0x4f0138], 1
jne 0x406d53
or dword [0x4f0138], 1
call fcn.00409300
push 0x4bc6d0
call fcn.004b779a
add esp, 4
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x24], 0x10
jb 0x406d62
mov eax, dword [eax + 0x10]
jmp 0x406d65
add eax, 0x10
mov edx, dword [0x4d6e98]
lea ecx, [esp + 0x2c]
push ecx
push eax
mov eax, dword [edx + 0x10]
mov ecx, 0x4d6e98
call eax
test al, al
mov bl, 1
jne 0x406d85
mov bl, byte [esp + 0x13]
lea eax, [esp + 0x3c]
mov byte [esp + 0x88], 1
call fcn.004b0720
lea eax, [esp + 0x2c]
mov dword [esp + 0x88], 0xffffffff
call fcn.004b0720
mov al, bl
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4