Function at 0x408610
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4619f6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7ac
push ebx
push ebp
mov ebx, ecx
push esi
push edi
lea ecx, [esp + 0xe4]
call fcn.004048f0
mov esi, dword [esp + 0x7cc]
xor edi, edi
push esi
mov ecx, ebx
mov dword [esp + 0x7c8], edi
call fcn.00407730
lea eax, [esp + 0x40]
mov ecx, ebx
push eax
call fcn.00407600
mov ecx, eax
mov eax, dword [ecx]
mov dword [esp + 0x1c], eax
mov edx, dword [ecx + 4]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 8]
mov ecx, dword [ecx + 8]
cmp ecx, edx
mov dword [esp + 0x24], ecx
ja 0x408b33
jmp 0x408686
xor edi, edi
and eax, 0xffff
cmp eax, 0xa100
jg 0x40895e
je 0x4088e6
add eax, 0xffff6000
cmp eax, 0x85
ja case.default.0x4088f9
xor ecx, ecx
mov cl, byte [eax + 0x408c04]
jmp dword [ecx*4 + 0x408be4]
lea edx, [esp + 0x4c]
push 0x1e
push edx
mov ecx, ebx
call fcn.00407530
mov al, byte [esp + 0x2b]
mov dword [esp + 0x30], edi
mov byte [esp + 0x2c], al
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebp, ecx
lea ecx, [esp + 0x30]
push ebp
call fcn.0040b420
test al, al
je 0x408721
mov edi, dword [esp + 0x30]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x4c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x34], ebp
mov byte [eax + ebp], 0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x7c4], 1
push ecx
lea ecx, [esp + 0xe8]
call fcn.00404730
mov eax, dword [esp + 0x30]
xor esi, esi
cmp eax, esi
mov byte [esp + 0x7c4], 0
je 0x408778
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40876f
cmp al, 0xff
je 0x40876f
dec al
mov byte [ecx], al
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
jmp case.default.0x4088f9
push ecx
call fcn.004273b2
add esp, 4
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
jmp case.default.0x4088f9
lea edx, [esp + 0x40]
mov ecx, ebx
push edx
call fcn.00407600
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x18], edx
lea edx, [esp + 0xdc]
mov eax, dword [eax + 8]
push edx
mov ecx, ebx
mov dword [esp + 0x20], eax
call fcn.00407750
push eax
lea ecx, [esp + 0xe8]
call fcn.00404ab0
jmp case.default.0x4088f9
lea eax, [esp + 0xb4]
mov ecx, ebx
push eax
call fcn.00407600
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x18], edx
lea edx, [esp + 0xd0]
mov eax, dword [eax + 8]
push edx
mov ecx, ebx
mov dword [esp + 0x20], eax
call fcn.00407750
push eax
lea ecx, [esp + 0xe8]
call fcn.00404ad0
jmp case.default.0x4088f9
lea eax, [esp + 0x6c]
mov ecx, ebx
push eax
call fcn.00407600
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x18], edx
lea edx, [esp + 0x94]
mov eax, dword [eax + 8]
push edx
mov ecx, ebx
mov dword [esp + 0x20], eax
call fcn.00407750
push eax
lea ecx, [esp + 0xe8]
call fcn.00404af0
jmp case.default.0x4088f9
lea eax, [esp + 0xc0]
mov ecx, ebx
push eax
call fcn.00407600
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x18], edx
mov ecx, ebx
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], eax
call fcn.004078c0
push ecx
lea ecx, [esp + 0xe8]
fstp dword [esp]
call fcn.00404b10
jmp case.default.0x4088f9
lea edx, [esp + 0xa8]
mov ecx, ebx
push edx
call fcn.00407600
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x18], edx
mov ecx, ebx
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], eax
call fcn.004078c0
push ecx
lea ecx, [esp + 0xe8]
fstp dword [esp]
call fcn.00404b60
jmp case.default.0x4088f9
mov ecx, ebx
call fcn.00407430
movsx eax, ax
cmp eax, 4
ja case.default.0x4088f9
jmp dword [eax*4 + 0x408c8c]
push edi
lea ecx, [esp + 0xe8]
call fcn.00404bb0
jmp case.default.0x4088f9
push 1
lea ecx, [esp + 0xe8]
call fcn.00404bb0
jmp case.default.0x4088f9
push 2
lea ecx, [esp + 0xe8]
call fcn.00404bb0
jmp case.default.0x4088f9
push 3
lea ecx, [esp + 0xe8]
call fcn.00404bb0
jmp case.default.0x4088f9
push 4
lea ecx, [esp + 0xe8]
call fcn.00404bb0
jmp case.default.0x4088f9
cmp eax, 0xa220
jg 0x408ab5
je 0x4089bf
sub eax, 0xa200
je 0x4089a8
sub eax, 4
je 0x408991
sub eax, 0xc
jne case.default.0x4088f9
lea ecx, [esp + 0xe4]
call fcn.00404a60
jmp 0x408ae3
lea ecx, [esp + 0xe4]
call fcn.00404a70
push eax
lea eax, [esp + 0x20]
push eax
jmp 0x408ae9
lea ecx, [esp + 0xe4]
call fcn.00404a40
lea ecx, [esp + 0x1c]
push eax
push ecx
jmp 0x408ae9
lea edx, [esp + 0x78]
mov ecx, ebx
push edx
call fcn.00407600
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x18], edx
mov ecx, ebx
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], eax
call fcn.004078c0
fstp dword [esp + 0x3c]
lea ecx, [esp + 0xe4]
call fcn.00404a90
mov edx, dword [esp + 0x3c]
mov ecx, ebx
mov dword [eax], edx
lea eax, [esp + 0x10]
push eax
call fcn.00407710
lea ecx, [esp + 0x84]
push ecx
mov ecx, ebx
call fcn.00407600
mov edx, eax
mov eax, dword [edx]
mov dword [esp + 0x10], eax
cmp ax, 0xa300
mov ecx, dword [edx + 4]
mov dword [esp + 0x14], ecx
mov edx, dword [edx + 8]
mov dword [esp + 0x18], edx
jne 0x408b56
lea eax, [esp + 0x4c]
push 0x1e
push eax
mov ecx, ebx
call fcn.00407530
mov esi, 0x475124
lea eax, [esp + 0x4c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408a77
test cl, cl
je 0x408a73
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408a77
add eax, 2
add esi, 2
test cl, cl
jne 0x408a53
xor eax, eax
jmp 0x408a7c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne case.default.0x4088f9
lea ecx, [esp + 0xe4]
call fcn.00404a90
mov edx, eax
mov edi, str.auto
or ecx, 0xffffffff
xor eax, eax
add edx, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp case.default.0x4088f9
cmp eax, 0xa230
je 0x408ad7
cmp eax, 0xa33a
jne case.default.0x4088f9
lea ecx, [esp + 0xe4]
call fcn.00404a50
lea ecx, [esp + 0x1c]
push eax
push ecx
jmp 0x408ae9
lea ecx, [esp + 0xe4]
call fcn.00404a80
lea edx, [esp + 0x1c]
push eax
push edx
mov ecx, ebx
call fcn.00408ca0
lea eax, [esp + 0x1c]
mov ecx, ebx
push eax
call fcn.00407710
lea ecx, [esp + 0x9c]
push ecx
mov ecx, ebx
call fcn.00407600
mov edx, eax
mov eax, dword [edx]
mov dword [esp + 0x1c], eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x20], ecx
mov ecx, dword [edx + 8]
mov edx, dword [esp + 0x7cc]
mov dword [esp + 0x24], ecx
cmp ecx, dword [edx + 8]
jbe 0x408684
xor edi, edi
mov ecx, dword [ebx + 0x2c]
lea esi, [ebx + 0x24]
lea eax, [esp + 0xe4]
push eax
push 1
push ecx
mov ecx, esi
call fcn.0040bca0
mov eax, dword [esi + 4]
cmp eax, edi
jne 0x408b65
xor ecx, ecx
jmp 0x408b7f
push str.L3DS::ReadMaterial___error__expected_chunk_not_found
call fcn.00426490
add esp, 4
jmp 0x408bbc
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x95a02569
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add edx, eax
mov ecx, edx
mov eax, dword [esi + 4]
cmp eax, edi
jne 0x408b8a
xor edx, edx
jmp 0x408ba2
mov esi, dword [esi + 8]
sub esi, eax
mov eax, 0x95a02569
imul esi
add edx, esi
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add edx, eax
dec ecx
push ecx
lea ecx, [edx + edx*8]
lea eax, [edx + ecx*8]
lea edx, [eax + eax*2]
mov eax, dword [ebx + 0x28]
lea ecx, [eax + edx*8 - 0x6d8]
call fcn.00404aa0
lea ecx, [esp + 0xe4]
call fcn.00404a20
mov ecx, dword [esp + 0x7bc]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x7b8
ret 4