Function at 0x51839c
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 6
push 0
push 0
dec ecx
jne 0x5183a5
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
test dl, dl
je 0x5183be
add esp, 0xfffffff0
call fcn.00402a90
mov dword [ebp - 8], ecx
mov byte [ebp - 1], dl
mov ebx, eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
xor eax, eax
push ebp
push 0x518905
push dword fs:[eax]
mov dword fs:[eax], esp
push edi
push esi
mov ecx, dword [ebp - 8]
xor edx, edx
mov eax, ebx
call fcn.00415db0
mov dword [ebx + 0x3c], esi
mov dl, 1
mov eax, dword [0x40f76c]
call fcn.00402978
mov esi, eax
mov dword [ebx + 0xc], esi
push 1
lea eax, [esi + 0xc]
mov ecx, 1
mov edx, dword [0x40f744]
call fcn.00404644
add esp, 4
push 0
lea eax, [esi + 0x10]
mov ecx, 1
mov edx, dword [0x40f758]
call fcn.00404644
add esp, 4
mov dl, 1
mov eax, dword [0x413614]
call fcn.00402978
mov dword [ebx + 0x10], eax
mov dl, 1
mov eax, dword [0x41badc]
call fcn.00402978
mov esi, eax
mov dword [ebx + 0x14], esi
mov eax, esi
mov dword [eax + 4], 0x73d
mov dword [eax + 8], 6
mov byte [eax + 0xc], 0
mov dl, 1
mov eax, dword [0x41bc0c]
call fcn.00402978
mov esi, eax
mov dword [ebx + 0x18], esi
lea eax, [esi + 4]
xor edx, edx
call fcn.00403464
lea eax, [esi + 8]
xor edx, edx
call fcn.00403464
mov dword [esi + 0xc], 0x73d
mov byte [esi + 0x10], 0
mov dl, 1
mov eax, dword [0x418008]
call fcn.00402978
mov esi, eax
mov dword [ebx + 0x1c], esi
mov eax, esi
mov dword [eax + 4], 0x73d
mov dword [eax + 8], 4
mov byte [eax + 0xc], 0
mov dl, 1
mov eax, dword [0x41684c]
call fcn.00402978
mov esi, eax
mov dword [ebx + 0x20], esi
mov byte [esi + 4], 0
lea eax, [ebp - 0x28]
mov edx, 0x518930
call fcn.00403464
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x24]
call fcn.0040ef88
lea edx, [ebp - 0x24]
lea eax, [esi + 0x24]
mov ecx, dword [0x40e37c]
call fcn.00403c78
mov dl, 1
mov eax, dword [0x412a5c]
call fcn.00402978
mov esi, eax
mov dword [ebx + 0x24], esi
lea eax, [esi + 4]
mov edx, 0x518938
call fcn.00403464
lea eax, [esi + 8]
mov edx, 0x518960
call fcn.00403464
mov byte [esi + 0xc], 0
mov byte [esi + 0xd], 3
mov byte [esi + 0xe], 0
mov dl, 1
mov eax, dword [0x413614]
call fcn.00402978
mov dword [ebx + 0x28], eax
mov dl, 1
mov eax, dword [0x412920]
call fcn.00402978
mov esi, eax
mov dword [ebx + 0x2c], esi
lea eax, [esi + 8]
xor edx, edx
call fcn.00403464
lea eax, [esi + 0xc]
xor edx, edx
call fcn.00403464
mov ecx, edi
mov dl, 1
mov eax, dword [0x40f580]
call fcn.0040f5f8
mov esi, eax
mov dword [ebx + 0x30], esi
mov byte [esi + 0x10], 0
mov dword [esi + 0x1c], ebx
push 1
lea eax, [esi + 0x14]
mov ecx, 1
mov edx, dword [0x40f558]
call fcn.00404644
add esp, 4
push 1
lea eax, [esi + 0x18]
mov ecx, 1
mov edx, dword [0x40f56c]
call fcn.00404644
add esp, 4
mov dl, 1
mov eax, dword [0x41684c]
call fcn.00402978
mov esi, eax
mov dword [ebx + 0x34], esi
mov byte [esi + 4], 0
lea eax, [ebp - 0x28]
mov edx, 0x518970
call fcn.00403464
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x24]
call fcn.0040ef88
lea edx, [ebp - 0x24]
lea eax, [esi + 0x24]
mov ecx, dword [0x40e37c]
call fcn.00403c78
mov ecx, edi
mov dl, 1
mov eax, dword [0x40f580]
call fcn.0040f5f8
mov esi, eax
mov dword [ebx + 0x38], esi
mov byte [esi + 0x10], 0
mov dword [esi + 0x1c], ebx
push 1
lea eax, [esi + 0x14]
mov ecx, 1
mov edx, dword [0x40f558]
call fcn.00404644
add esp, 4
push 1
lea eax, [esi + 0x18]
mov ecx, 1
mov edx, dword [0x40f56c]
call fcn.00404644
add esp, 4
mov eax, dword [ebx + 0xc]
mov dword [ebx + 8], eax
mov eax, dword [ebx + 0xc]
mov dword [eax + 8], ebx
mov edx, dword [ebp - 8]
mov dword [eax + 4], edx
mov eax, dword [ebx + 0x10]
push eax
push 0x41367c
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 0x34]
mov dword [eax], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 8], edx
mov eax, dword [ebx + 0x1c]
push eax
push 0x41805c
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x10]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x2c], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x30], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x34], edx
mov eax, dword [ebx + 0x18]
push eax
push 0x41bc7c
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x14]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x34], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x38], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x3c], edx
mov eax, dword [ebx + 0xc]
push eax
push 0x40f7f8
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x14]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x28], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x2c], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x30], edx
mov eax, dword [ebx + 0xc]
push eax
push 0x40f7e0
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x38], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x3c], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x40], edx
mov eax, dword [ebx + 0x30]
push eax
push 0x40f69c
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x20], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x24], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x28], edx
mov eax, dword [ebx + 0x20]
push eax
push 0x4168c0
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x1c]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x34], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x38], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x3c], edx
mov eax, dword [ebx + 0xc]
push eax
push 0x40f7f8
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x1c]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x28], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x2c], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x30], edx
mov eax, dword [ebx + 0x30]
push eax
push 0x40f670
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x20]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x5c], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x60], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x64], edx
mov eax, dword [ebx + 0x34]
push eax
push 0x4168c0
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x20]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x68], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x6c], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x70], edx
mov eax, dword [ebx + 0xc]
push eax
push 0x40f7e0
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x28]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x2c], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x30], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x34], edx
mov eax, dword [ebx + 0xc]
push eax
push 0x40f7f8
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x28]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x20], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x24], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x28], edx
mov eax, dword [ebx + 0x14]
push eax
push 0x41bb34
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x14]
mov edx, dword [ebp - 0x34]
mov dword [eax], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 8], edx
mov eax, dword [ebx + 0xc]
push eax
push 0x40f7f8
lea edx, [ebp - 0x34]
mov ax, 1
call fcn.0040e564
mov esi, dword [ebx + 0x30]
mov eax, dword [esi + 0x18]
mov edx, dword [ebp - 0x34]
mov dword [eax], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 8], edx
push esi
push 0x40f670
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x34]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x5c], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x60], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x64], edx
mov eax, dword [ebx + 0x28]
push eax
push 0x41367c
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.0040e564
mov eax, dword [ebx + 0x34]
mov edx, dword [ebp - 0x34]
mov dword [eax + 0x68], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x6c], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x70], edx
mov edx, 0x516fbc
mov eax, dword [ebx + 0x30]
call fcn.0040f6c8
mov edx, 0x51799c
mov eax, dword [ebx + 0x38]
call fcn.0040f6c8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51890c
lea eax, [ebp - 0x28]
call fcn.00403340
lea eax, [ebp - 0x24]
mov edx, dword [0x40e37c]
call fcn.00403a68
ret