Function at 0x4018a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4abc31
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4dd704]
xor eax, esp
push eax
lea eax, [esp + 0x5c]
mov dword fs:[0], eax
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], ecx
mov edi, dword [esp + 0x70]
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov esi, dword [edi + 0x28]
mov ebx, dword [edi + 0x30]
mov dword [esp + 0x54], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x40], eax
mov eax, dword [edi + 0x10]
mov dword [esp + 0x58], edx
mov edx, dword [edi + 0xc]
mov dword [esp + 0x48], eax
mov eax, dword [edi + 0x20]
mov dword [esp + 0x44], edx
mov edx, dword [edi + 0x14]
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x24]
mov dword [esp + 0x4c], edx
mov edx, dword [edi + 0x2c]
xor ebp, ebp
mov dword [esp + 0x64], 1
mov dword [esp + 0x30], esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x34], ebx
test al, 1
je 0x401937
mov dword [esp + 0x18], 0x10000000
mov ebp, dword [esp + 0x18]
test al, 2
je 0x401940
or ebp, 0x10
jmp 0x401943
or ebp, 0x60
test al, 4
je 0x40194d
or ebp, 0x20000000
mov eax, dword [0x4dea20]
cmp eax, ecx
je 0x401961
push eax
call fcn.00403610
add esp, 4
xor ecx, ecx
mov dword [esp + 0x70], ecx
mov byte [esp + 0x64], 2
cmp esi, 1
jne 0x4019bd
push ecx
push ecx
push 0x100
push esi
push ebx
push ecx
lea eax, [esp + 0x50]
or ebp, 2
push eax
mov dword [esp + 0x34], ebp
call fcn.00409f40
mov ecx, dword [esp + 0x8c]
add esp, 0x1c
mov esi, eax
mov dword [esp + 0x70], 0
test ecx, ecx
je 0x401a05
mov edx, dword [ecx]
mov edx, dword [edx + 8]
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], ecx
call edx
mov eax, dword [esi]
mov dword [esp + 0x70], eax
jmp 0x401a68
cmp esi, 2
jne 0x401a0d
mov edx, dword [ebx]
push ecx
push edx
add ebx, 4
push ebx
push ecx
push ecx
lea eax, [esp + 0x4c]
or ebp, 1
push eax
mov dword [esp + 0x30], ebp
call fcn.00406630
mov ecx, dword [esp + 0x88]
add esp, 0x18
mov esi, eax
mov dword [esp + 0x70], 0
test ecx, ecx
je 0x401a05
mov edx, dword [ecx]
mov edx, dword [edx + 8]
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], ecx
call edx
mov eax, dword [esi]
mov dword [esp + 0x70], eax
jmp 0x401a68
cmp esi, 3
jne 0x401a3c
mov edx, dword [esp + 0x20]
push 1
lea eax, [esp + 0x2c]
push eax
push ecx
lea ecx, [esp + 0x44]
or ebp, 4
push ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edx
call fcn.004071e0
add esp, 0x10
jmp 0x401a5e
cmp esi, 4
jne 0x401d7c
push ecx
push ecx
push ebx
push ecx
push ecx
lea edx, [esp + 0x4c]
or ebp, 8
push edx
mov dword [esp + 0x30], ebp
call fcn.00406de0
add esp, 0x18
push eax
lea ecx, [esp + 0x74]
call fcn.0045b5a0
cmp dword [0x4dea20], 0
je 0x401a76
call fcn.00403690
mov ecx, dword [esp + 0x70]
test ecx, ecx
jne 0x401b06
mov esi, dword [esp + 0x6c]
mov eax, dword [esp + 0x14]
mov dword [esi], ecx
push eax
mov ecx, esi
call fcn.00404b10
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x1c], 1
mov byte [esp + 0x64], 1
mov dword [esp + 0x70], 0
test ecx, ecx
je 0x401ac1
mov edx, dword [ecx]
mov edx, dword [edx + 8]
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], ecx
call edx
mov edx, dword [esp + 0x14]
mov byte [esp + 0x64], 0
test edx, edx
je 0x401db2
lea eax, [edx + 4]
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x28]
mov eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x401db2
test edx, edx
je 0x401db2
mov eax, dword [edx]
mov ecx, edx
mov edx, dword [eax]
push 1
call edx
jmp 0x401db2
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
call edx
cmp dword [esp + 0x58], edx
ja 0x401d03
jb 0x401b23
cmp dword [esp + 0x54], eax
ja 0x401d03
mov esi, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov ebx, esi
add ebx, dword [esp + 0x54]
adc ecx, dword [esp + 0x58]
cmp ecx, edx
ja 0x401d03
jb 0x401b47
cmp ebx, eax
ja 0x401d03
or esi, dword [esp + 0x44]
jne 0x401b55
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
mov ecx, dword [esp + 0x48]
or ecx, dword [esp + 0x4c]
jne 0x401b67
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], edx
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
xor esi, esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
cmp ecx, edx
jb 0x401b99
mov eax, dword [esp + 0x48]
ja 0x401b89
cmp eax, dword [esp + 0x40]
jbe 0x401b99
sub eax, dword [esp + 0x40]
sbb ecx, edx
mov esi, eax
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x40]
push eax
push edx
push ecx
push ebp
call fcn.00401de0
mov ebp, eax
mov eax, dword [esp + 0x30]
add esp, 0x10
add ebp, esi
mov ebx, edx
adc ebx, dword [esp + 0x3c]
add eax, 0x38
je 0x401bd5
push eax
call fcn.0049badd
add esp, 4
mov dword [esp + 0x50], eax
test eax, eax
je 0x401bdb
mov esi, eax
jmp 0x401bdd
xor eax, eax
mov dword [esp + 0x50], eax
xor esi, esi
mov ecx, dword [esp + 0x20]
neg eax
sbb eax, eax
add ecx, 0x38
and eax, ecx
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], eax
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x40]
mov dword [esi], 0xf001
mov dword [esi + 4], 0x28
mov dword [esi + 8], edx
mov edx, dword [esp + 0x44]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], edx
mov eax, dword [edi + 0x10]
mov dword [esi + 0x28], eax
mov ecx, dword [edi + 0x14]
mov dword [esi + 0x2c], ecx
mov edx, dword [edi + 0x18]
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x18], edx
mov eax, dword [edi + 0x1c]
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x30]
mov dword [esi + 0x20], ecx
mov edx, dword [edi + 0x24]
mov ecx, dword [esp + 0x34]
mov dword [esi + 0x24], edx
mov dword [esi + 0x30], eax
mov eax, dword [esp + 0x20]
push eax
push ecx
lea edx, [esi + 0x38]
push edx
mov byte [esp + 0x70], 3
mov dword [esi + 0x34], eax
call fcn.0049c200
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x34]
shr ecx, 0x1c
and cl, 1
push esi
movzx edx, cl
push edx
push eax
push ebx
push ebp
call fcn.00403a80
add esp, 0x24
mov dword [esp + 0x34], eax
test eax, eax
jne 0x401cb5
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x6c]
push ecx
mov ecx, esi
mov dword [esi], eax
call fcn.00404b10
lea ecx, [esp + 0x48]
mov dword [esp + 0x1c], 1
call fcn.00401740
jmp 0x401d96
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x30]
call fcn.004017a0
mov esi, dword [esp + 0x6c]
push eax
mov ecx, esi
call fcn.0044dec0
lea ecx, [esp + 0x48]
mov dword [esp + 0x1c], 1
call fcn.00401740
jmp 0x401d96
mov esi, dword [esp + 0x6c]
mov eax, dword [esp + 0x14]
push eax
mov ecx, esi
mov dword [esi], 0
call fcn.00404b10
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x1c], 1
mov byte [esp + 0x64], 1
mov dword [esp + 0x70], 0
test ecx, ecx
je 0x401d46
mov edx, dword [ecx]
mov edx, dword [edx + 8]
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x38], ecx
call edx
mov edx, dword [esp + 0x14]
mov byte [esp + 0x64], 0
test edx, edx
je 0x401db2
lea eax, [edx + 4]
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x34]
mov eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x401db2
test edx, edx
je 0x401db2
mov eax, dword [edx]
mov ecx, edx
mov edx, dword [eax]
push 1
call edx
jmp 0x401db2
mov esi, dword [esp + 0x6c]
mov eax, dword [esp + 0x14]
mov dword [esi], ecx
push eax
mov ecx, esi
call fcn.00404b10
mov dword [esp + 0x1c], 1
lea ecx, [esp + 0x70]
mov byte [esp + 0x64], 1
call fcn.004733d0
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], 0
call fcn.00453d80
mov eax, esi
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret