Function at 0x4055f0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x477607
mov eax, dword fs:[0]
push eax
sub esp, 0x1b0
mov eax, dword [0x4a6eb0]
xor eax, esp
mov dword [esp + 0x1a8], eax
push ebx
push esi
push edi
mov eax, dword [0x4a6eb0]
xor eax, esp
push eax
lea eax, [esp + 0x1c0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edx, dword [0x4a743c]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x18], eax
mov eax, dword [edx + 0xc]
xor esi, esi
mov ecx, 0x4a743c
mov dword [esp + 0x28], edi
mov dword [esp + 0x20], esi
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c8], esi
mov esi, 1
mov dword [esp + 0x24], esi
cmp dword [ebp + 0x14], esi
jb 0x405a20
mov ebx, 0x16d
push ebx
lea ecx, [esp + 0x48]
push 0
push ecx
mov dword [esp + 0x44], ebx
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0
lea edx, [esp + 0x3c]
push edx
push ebx
lea eax, [esp + 0x50]
push eax
push ebx
mov ecx, eax
push ecx
push 0x220448
push edi
mov dword [esp + 0x64], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x405781
push ebx
mov dword [esp + 0x14], ebx
call fcn.00468318
mov edx, dword [esp + 0x14]
push edx
mov ebx, eax
push 0
push ebx
call sub.MSVCR90.dll_memset
add esp, 0x10
push 0
lea eax, [esp + 0x14]
push eax
mov dword [ebx], esi
mov eax, dword [esp + 0x18]
push eax
push ebx
push eax
push ebx
push 0x22040c
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x405705
push ebx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x405a12
mov ecx, dword [ebx]
mov dword [esp + 0x44], ecx
mov edx, dword [ebx + 4]
mov dword [esp + 0x48], edx
mov eax, dword [ebx + 8]
mov dword [esp + 0x4c], eax
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x50], ecx
mov edx, dword [ebx + 0x10]
mov dword [esp + 0x54], edx
mov ax, word [ebx + 0x14]
mov word [esp + 0x58], ax
mov cl, byte [ebx + 0x16]
mov byte [esp + 0x5a], cl
cmp byte [ebx + 0x17], 0
lea esi, [ebx + 0x23]
sete dl
mov byte [esp + 0x5b], dl
mov al, byte [ebx + 0x18]
mov byte [esp + 0x5c], al
mov cx, word [ebx + 0x19]
mov word [esp + 0x5d], cx
mov edx, dword [ebx + 0x1b]
mov dword [esp + 0x5f], edx
mov eax, dword [ebx + 0x1f]
mov dword [esp + 0x63], eax
mov ecx, 0x52
lea edi, [esp + 0x67]
rep movsd dword es:[edi], dword [esi]
push ebx
movsw word es:[edi], word [esi]
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
add esp, 4
mov ecx, dword [esp + 0x18]
mov ebx, dword [ecx + 4]
push 0xffffffffffffffff
lea edx, [ebx + 1]
push edx
call fcn.00405540
push 0
push 0x481de0
lea ecx, [esp + 0x34]
call fcn.004028b0
cmp dword [esp + 0x63], 1
jne 0x4057d5
mov ecx, dword [esp + 0x18]
cmp ebx, dword [ecx + 4]
jae 0x405a71
mov eax, ebx
imul eax, eax, 0x1e4
add eax, dword [ecx]
mov ecx, dword [esp + 0x30]
add eax, 8
push eax
lea eax, [esp + 0x4c]
push eax
push esi
push edi
call fcn.004050e0
cmp dword [esp + 0x63], 0
je 0x4058a0
mov edx, dword [0x4a743c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4a743c
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x10]
push ecx
push esi
mov esi, dword [esp + 0x38]
push edi
mov ecx, esi
mov byte [esp + 0x1d4], 1
call fcn.00404df0
mov edi, dword [esp + 0x10]
test al, al
je 0x405876
lea edx, [esp + 0x2c]
push edx
push 0
push edi
mov ecx, esi
call fcn.00404a60
test al, al
je 0x405876
mov eax, dword [esp + 0x2c]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x38], esp
mov esi, esp
push eax
call fcn.00401520
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov esi, dword [esp + 0x1c]
mov byte [esp + 0x1cc], 2
cmp ebx, dword [esi + 4]
jae 0x405a71
mov ecx, ebx
imul ecx, ecx, 0x1e4
add ecx, dword [esi]
mov byte [esp + 0x1cc], 1
call fcn.00404780
jmp 0x40587a
mov esi, dword [esp + 0x18]
lea eax, [edi - 0x10]
mov byte [esp + 0x1c8], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4058a4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4058a4
mov esi, dword [esp + 0x18]
cmp ebx, dword [esi + 4]
jae 0x405a71
mov eax, dword [esi]
mov ecx, ebx
imul ecx, ecx, 0x1e4
add eax, ecx
mov dword [esp + 0x34], ecx
lea edi, [eax + 0x76]
mov ecx, 0x5b
lea esi, [esp + 0x44]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov byte [eax + 0x75], 1
cmp byte [esp + 0x5c], 0
je 0x405a0a
mov edx, dword [0x4a743c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4a743c
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x34]
push edx
push eax
mov byte [esp + 0x1d4], 3
call fcn.00405320
mov esi, dword [esp + 0x18]
mov byte [esp + 0x1f], al
test al, al
je 0x405953
cmp ebx, dword [esi + 4]
jae 0x405a71
mov ecx, dword [esi]
add ecx, dword [esp + 0x34]
lea edx, [esp + 0x3c]
push edx
call fcn.004043b0
or dword [esp + 0x20], 1
push 0x481de0
push eax
call fcn.00404110
add esp, 8
mov byte [esp + 0x17], 1
test al, al
jne 0x405958
mov byte [esp + 0x17], 0
test byte [esp + 0x20], 1
je 0x405984
mov eax, dword [esp + 0x3c]
and dword [esp + 0x20], 0xfffffffe
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405984
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x17], 0
je 0x4059cb
mov eax, dword [esp + 0x10]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x44], esp
mov edi, esp
push eax
call fcn.00401520
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov byte [esp + 0x1cc], 4
cmp ebx, dword [esi + 4]
jae 0x405a71
mov ecx, dword [esi]
add ecx, dword [esp + 0x38]
mov byte [esp + 0x1cc], 3
call fcn.00404780
cmp byte [esp + 0x1f], 0
je 0x4059e2
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x34]
push ebx
push esi
call fcn.00405a80
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x1c8], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405a0a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
inc esi
mov dword [esp + 0x24], esi
cmp esi, dword [ebp + 0x14]
jbe 0x405678
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov dword [esp + 0x1c8], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a4b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x1c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1a8]
xor ecx, esp
call fcn.004764f6
mov esp, ebp
pop ebp
ret 0x10
push 0x80070057
call fcn.00401120
int3