Function at 0x401330
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x32c
mov eax, dword [0x413004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x300]
push edi
mov edi, edx
mov dword [ebp - 0x30c], esi
push eax
push edi
mov dword [ebp - 0x314], edi
mov ebx, ecx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x300], 0x10003
call dword [0x40d128]
test eax, eax
js 0x4015a9
push 0x40
push 0x3000
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x1000
push eax
push 0
lea eax, [ebp - 0x1c]
push eax
push ebx
call dword [0x40d120]
test eax, eax
js 0x4015a9
test esi, esi
je 0x4013b0
movzx esi, word [esi]
jmp 0x4013b2
xor esi, esi
xorps xmm0, xmm0
mov dword [ebp - 0x304], esi
movlpd qword [ebp - 0x320], xmm0
mov ecx, 0x4012f0
mov byte [ebp - 0x320], 1
mov edx, 0x8f8ed6b0
mov eax, dword [ebp - 0x320]
add eax, ecx
movlpd qword [ebp - 0x328], xmm0
mov dword [ebp - 0x310], eax
mov eax, 0x401320
sub eax, 0x4012f0
mov dword [ebp - 0x308], eax
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + 0x1c]
mov ecx, dword [ecx + 8]
call fcn.004015c0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x248]
mov dword [ebp - 0x30], eax
movzx eax, si
mov word [ebp - 0x28], ax
mov word [ebp - 0x26], ax
lea eax, [ecx + 0x10]
push 0
push 0x10
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x30]
push eax
push ecx
push ebx
call dword [0x40d114]
mov esi, eax
test esi, esi
js 0x401586
mov ecx, dword [ebp - 0x30c]
test ecx, ecx
je 0x401475
mov eax, dword [ebp - 0x1c]
push 0
push dword [ebp - 0x304]
add eax, 0x10
push dword [ecx + 4]
push eax
push ebx
call dword [0x40d114]
mov esi, eax
test esi, esi
js 0x401586
mov ecx, dword [ebp - 0x304]
mov eax, dword [ebp - 0x1c]
add ecx, 0x1f
push 0
push dword [ebp - 0x308]
add eax, ecx
push dword [ebp - 0x310]
and eax, 0xfffffff0
push eax
push ebx
mov dword [ebp - 0x248], eax
call dword [0x40d114]
mov esi, eax
test esi, esi
js 0x401586
push dword [ebp - 0x308]
push dword [ebp - 0x248]
push ebx
call dword [0x40d124]
lea eax, [ebp - 0x300]
push eax
push edi
call dword [0x40d118]
mov esi, eax
test esi, esi
js 0x401586
lea eax, [ebp - 0x300]
push eax
push edi
call dword [0x40d128]
push 0
push edi
call dword [0x40d130]
mov esi, eax
test esi, esi
js 0x401586
mov dword [ebp - 0x18], 0xffb3b4c0
mov edi, 0x1e
mov dword [ebp - 0x14], 0xffffffff
nop dword [eax + eax]
push 0
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x1c]
push ebx
call dword [0x40d11c]
mov esi, eax
test esi, esi
js 0x401586
cmp dword [ebp - 0xc], 0
je 0x40153f
lea eax, [ebp - 0x18]
push eax
push 0
call dword [0x40d138]
sub edi, 1
jne 0x401510
lea eax, [ebp - 0x18]
push eax
push 0
call dword [0x40d138]
lea eax, [ebp - 0x300]
push eax
push dword [ebp - 0x314]
call dword [0x40d128]
mov esi, eax
test esi, esi
js 0x401586
mov edx, dword [ebp - 0x248]
mov ecx, dword [ebp - 0x1c]
cmp edx, ecx
jb 0x401582
lea eax, [ecx + 0x1000]
cmp edx, eax
ja 0x401582
mov esi, 0xc0000001
jmp 0x401589
xor esi, esi
jmp 0x401589
mov ecx, dword [ebp - 0x1c]
push 0x8000
lea eax, [ebp - 0x10]
mov dword [ebp - 0x20], ecx
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x10], 0
push eax
push ebx
call dword [0x40d12c]
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040166c
mov esp, ebp
pop ebp
ret