Function at 0x408a40
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5715f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebp
mov ebp, ecx
xor eax, eax
mov al, byte [ebp + 0x52]
test al, al
sete cl
push esi
mov esi, dword [esp + 0x30]
mov edx, dword [esi]
mov dword [esp + 0xc], ebp
push ecx
push eax
mov eax, dword [esp + 0x34]
push eax
mov ecx, esi
call dword [edx + 4]
test al, al
jne 0x408a93
pop esi
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret 0x10
mov edx, dword [esi]
push ebx
xor ebx, ebx
push ebx
mov ecx, esi
call dword [edx + 0x10]
test al, al
jne 0x408ab6
pop ebx
pop esi
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret 0x10
mov eax, dword [esi]
push edi
push 4
lea ecx, [esp + 0x14]
push ecx
mov ecx, esi
mov dword [esp + 0x18], ebx
call dword [eax + 0x18]
cmp al, 1
jne 0x408c56
mov eax, dword [esp + 0x10]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x10]
test al, al
je 0x408b28
mov edx, dword [esi]
push 1
lea eax, [esp + 0x3c]
push eax
mov ecx, esi
mov dword [esp + 0x40], ebx
call dword [edx + 0x18]
test al, al
je 0x408b28
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0055e5a4
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x38]
mov edx, dword [esi]
push eax
push edi
mov ecx, esi
call dword [edx + 0x18]
test al, al
jne 0x408b3f
push edi
call fcn.0055f7dd
add esp, 4
pop edi
pop ebx
pop esi
xor al, al
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret 0x10
mov ecx, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
push ecx
push edi
lea edx, [esp + 0x20]
push edx
push ebp
mov dword [esp + 0x28], 0x40
call fcn.004cea00
mov ecx, dword [ebp]
mov eax, str.XFS2
mov edx, dword [eax]
add esp, 0x10
cmp ecx, edx
jne 0x408b1f
cmp dword [ebp + 0x14], 0x10000
jne 0x408b1f
mov edx, dword [ebp + 8]
mov eax, dword [esi]
push 3
lea ecx, [esp + 0x38]
shl edx, 7
push ecx
mov ecx, esi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], edx
call dword [eax + 0x18]
test al, al
je 0x408b1f
mov ecx, dword [esp + 0x40]
call fcn.00409420
mov edx, dword [esp + 0x34]
push edx
call fcn.0055e5a4
mov ebx, eax
add esp, 4
mov dword [esp + 0x18], ebx
mov byte [esp + 0x2c], 1
mov ecx, dword [esp + 0x34]
mov eax, dword [esi]
push ecx
push ebx
mov ecx, esi
call dword [eax + 0x18]
test al, al
jne 0x408bee
push ebx
call fcn.0055f7dd
push edi
call fcn.0055f7dd
add esp, 8
pop edi
pop ebx
pop esi
xor al, al
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret 0x10
mov edx, dword [ebp + 8]
shl edx, 8
push edx
call fcn.0055e5a4
mov edi, eax
mov dword [esp + 0x24], edi
mov byte [esp + 0x30], 2
mov eax, dword [esp + 0x38]
push eax
push ebx
lea ecx, [esp + 0x48]
push ecx
push edi
call fcn.004cea00
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x28]
add esp, 0x14
push edx
push edi
push eax
call fcn.004088a0
mov edx, dword [esi]
add ebp, 0x10
push ebp
mov ecx, esi
call dword [edx + 0x14]
push edi
call fcn.0055f7dd
push ebx
call fcn.0055f7dd
mov eax, dword [esp + 0x24]
push eax
call fcn.0055f7dd
mov ebp, dword [esp + 0x20]
add esp, 0xc
jmp 0x408c8f
mov eax, dword [esp + 0x3c]
lea edi, [eax + 0x18]
mov dword [eax], 0x32534658
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], 4
mov dword [eax + 0x14], 0x10000
mov ecx, 0xa
mov esi, str.The_Xenesis2_file_system_version_2.0.0
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x40]
call fcn.00409420
mov ecx, dword [esp + 0x24]
pop edi
pop ebx
mov byte [ebp + 0x51], 0
pop esi
mov al, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x20
ret 0x10