Function at 0x4065b0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x55767b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebp
push esi
push edi
mov edi, ecx
lea ecx, [esp + 0xc]
mov dword [esp + 0x30], 0
call fcn.005132d2
push 0x104
lea ecx, [esp + 0x10]
mov byte [esp + 0x34], 1
call fcn.005133e0
mov esi, eax
mov eax, dword [esp + 0x38]
push 0x104
push esi
push eax
call dword [0x57027c]
test eax, eax
je 0x406612
push esi
lea ecx, [esp + 0x3c]
call fcn.005135fc
or ebp, 0xffffffff
lea ecx, [esp + 0xc]
push ebp
call fcn.005133b6
mov ecx, dword [edi + 0x108]
mov esi, dword [edi + 0x20]
test ecx, ecx
je 0x40667d
mov edx, dword [ecx]
lea eax, [esp + 0x10]
push ebx
push eax
call dword [edx + 0xc]
mov eax, dword [eax]
mov ecx, dword [esp + 0x3c]
push eax
push ecx
call dword [0x571264]
add esp, 8
lea ecx, [esp + 0x14]
test eax, eax
sete bl
call fcn.005132cc
test bl, bl
pop ebx
jne 0x406666
mov ecx, edi
call fcn.004039b0
test eax, eax
jne 0x40667d
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 0
call fcn.005132cc
mov dword [esp + 0x30], ebp
jmp 0x406866
push 0x10c
call fcn.00513446
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov byte [esp + 0x30], 2
je 0x4066a0
mov ecx, eax
call fcn.0048aa10
jmp 0x4066a2
xor eax, eax
mov edx, dword [esp + 0x38]
mov ecx, eax
push edx
mov byte [esp + 0x34], 1
mov dword [edi + 0x108], eax
call fcn.0048afc0
mov ebp, eax
test ebp, ebp
je 0x40676e
lea ecx, [esp + 0x10]
call fcn.005132d2
cmp ebp, 2
mov byte [esp + 0x30], 3
jne 0x4066e7
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x10]
push eax
push str._s_nCannot_open_file._nBad_path
push ecx
jmp 0x4066fb
cmp ebp, 1
jne 0x406703
mov edx, dword [esp + 0x38]
lea eax, [esp + 0x10]
push edx
push str._s:_nUnknown_file_format.
push eax
call fcn.005134dc
add esp, 0xc
mov ecx, dword [esp + 0x10]
push 0
push 0x30
push ecx
call fcn.00513464
mov ecx, dword [edi + 0x108]
test ecx, ecx
je 0x406721
mov edx, dword [ecx]
push 1
call dword [edx]
lea ecx, [esp + 0x10]
mov dword [edi + 0x108], 0
mov byte [esp + 0x30], 1
call fcn.005132cc
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 0
call fcn.005132cc
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], 0xffffffff
call fcn.005132cc
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 4
push 0x2e
lea ecx, [esp + 0x3c]
call fcn.005133ce
push eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x40]
call fcn.005133c8
mov eax, dword [eax]
mov ecx, 0x5c5210
push eax
mov byte [esp + 0x34], 4
call fcn.005135c0
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 1
call fcn.005132cc
lea edi, [esi + 0x2784]
push 1
mov ecx, edi
call fcn.00492870
push 1
mov ecx, edi
call fcn.00492aa0
push 1
mov ecx, edi
call fcn.00492970
call fcn.0042f610
mov ecx, eax
call fcn.00493300
call fcn.0042f600
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xdc]
call fcn.0042f5f0
mov ecx, eax
call fcn.004966c0
call fcn.0042f660
mov ecx, eax
call fcn.00486630
push 2
mov ecx, esi
call fcn.00440000
mov ecx, dword [esi + 0x27a4]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [0x571410]
mov eax, dword [esi + 0x27a4]
push 0x105
lea edx, [esp + 0x1c]
push 0
push edx
push eax
call dword [0x57140c]
mov ecx, dword [esi + 0xc0]
push 5
push ecx
call dword [0x571404]
test eax, eax
je 0x406850
push eax
call fcn.00513602
mov ecx, eax
call fcn.00513656
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 0
call fcn.005132cc
mov dword [esp + 0x30], 0xffffffff
lea ecx, [esp + 0x38]
call fcn.005132cc
mov ecx, dword [esp + 0x28]
pop edi
pop esi
mov eax, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x28
ret 4