Function at 0x4055e0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x476e87
mov eax, dword fs:[0]
push eax
sub esp, 0x1b0
mov eax, dword [0x4a5eb0]
xor eax, esp
mov dword [esp + 0x1a8], eax
push ebx
push esi
push edi
mov eax, dword [0x4a5eb0]
xor eax, esp
push eax
lea eax, [esp + 0x1c0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edx, dword [0x4a643c]
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, 0x4a643c
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 0x405a10
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 0x405771
push ebx
mov dword [esp + 0x14], ebx
call fcn.00467b98
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 0x4056f5
push ebx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x405a02
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.00405530
push 0
push 0x480de0
lea ecx, [esp + 0x34]
call fcn.004028b0
cmp dword [esp + 0x63], 1
jne 0x4057c5
mov ecx, dword [esp + 0x18]
cmp ebx, dword [ecx + 4]
jae 0x405a61
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.004050d0
cmp dword [esp + 0x63], 0
je 0x405890
mov edx, dword [0x4a643c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4a643c
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.00404de0
mov edi, dword [esp + 0x10]
test al, al
je 0x405866
lea edx, [esp + 0x2c]
push edx
push 0
push edi
mov ecx, esi
call fcn.00404a50
test al, al
je 0x405866
mov eax, dword [esp + 0x2c]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x38], esp
mov esi, esp
push eax
call fcn.004014f0
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 0x405a61
mov ecx, ebx
imul ecx, ecx, 0x1e4
add ecx, dword [esi]
mov byte [esp + 0x1cc], 1
call fcn.00404770
jmp 0x40586a
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 0x405894
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x405894
mov esi, dword [esp + 0x18]
cmp ebx, dword [esi + 4]
jae 0x405a61
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 0x4059fa
mov edx, dword [0x4a643c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4a643c
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.00405310
mov esi, dword [esp + 0x18]
mov byte [esp + 0x1f], al
test al, al
je 0x405943
cmp ebx, dword [esi + 4]
jae 0x405a61
mov ecx, dword [esi]
add ecx, dword [esp + 0x34]
lea edx, [esp + 0x3c]
push edx
call fcn.004043a0
or dword [esp + 0x20], 1
push 0x480de0
push eax
call fcn.00404100
add esp, 8
mov byte [esp + 0x17], 1
test al, al
jne 0x405948
mov byte [esp + 0x17], 0
test byte [esp + 0x20], 1
je 0x405974
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 0x405974
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x17], 0
je 0x4059bb
mov eax, dword [esp + 0x10]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x44], esp
mov edi, esp
push eax
call fcn.004014f0
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov byte [esp + 0x1cc], 4
cmp ebx, dword [esi + 4]
jae 0x405a61
mov ecx, dword [esi]
add ecx, dword [esp + 0x38]
mov byte [esp + 0x1cc], 3
call fcn.00404770
cmp byte [esp + 0x1f], 0
je 0x4059d2
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x34]
push ebx
push esi
call fcn.00405a70
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 0x4059fa
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 0x405668
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 0x405a3b
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.00475d76
mov esp, ebp
pop ebp
ret 0x10
push 0x80070057
call fcn.00401100
int3