Function at 0x405800
Capabilities:
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0x420c68
push dword [esi + 4]
call fcn.0040ac43
mov ebx, eax
add esp, 8
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x405cb2
push ebx
push 1
lea eax, [esp + 0x38]
push 0x80
push eax
call fcn.0040b494
push 0
push dword [esp + 0x74]
push ebx
call fcn.0040b011
movzx eax, word [esp + 0x54]
xor ecx, ecx
add esp, 0x1c
mov edx, 0x30
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405fa0
movzx ecx, word [esp + 0x3c]
add esp, 4
mov edi, eax
mov dword [esp + 0x2c], edi
push ebx
push ecx
push 0x30
push edi
call fcn.0040b494
movzx eax, word [esp + 0x48]
xor ecx, ecx
mov edx, 0x10
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405fa0
mov esi, eax
xor ecx, ecx
mov ax, word [esp + 0x4c]
xor edx, edx
add esp, 0x14
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], ecx
cmp dx, ax
jae 0x405a04
mov ebx, esi
add edi, 8
nop dword [eax + eax]
movzx eax, ax
lea esi, [edi + 0x14]
dec eax
mov dword [esp + 0x1c], esi
lea edx, [edi + 0x10]
mov dword [esp + 0x24], edx
cmp ecx, eax
jge 0x4058ed
mov eax, dword [edi + 0x40]
sub eax, dword [edx]
jmp 0x4058f7
mov eax, dword [esi]
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x28], eax
mov dword [ebx + 8], eax
movzx eax, word [edi]
test ax, ax
jns 0x4059d2
and eax, 0x7fff
mov word [edi], ax
mov ecx, dword [edx]
mov eax, dword [esp + 0x68]
push 0
lea eax, [eax + ecx*2]
push eax
push dword [esp + 0x1c]
call fcn.0040b011
mov eax, dword [esi]
xor ecx, ecx
add esp, 0xc
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405fa0
mov ecx, dword [esp + 0x20]
add esp, 4
mov esi, eax
push dword [esp + 0x14]
push dword [ecx]
push 2
push esi
call fcn.0040b494
push 0
lea eax, [esp + 0x24]
mov dword [0x4238b0], 0x18
push eax
mov eax, dword [esp + 0x34]
mov ecx, esi
push ebx
mov edx, dword [eax]
call fcn.004012e0
mov ecx, dword [ebx]
add esp, 0x1c
mov eax, dword [ecx + 4]
mov dword [ebx + 4], eax
push dword [ecx + 4]
mov eax, dword [esp + 0x20]
push dword [eax]
mov eax, dword [esp + 0x2c]
push dword [eax]
push dword [esp + 0x24]
push str.Mesh__d_face_index_start_at__d__triangle_list_index__d_____triangle_strip_index__d_n
call fcn.004057c0
mov edx, dword [ebx]
add esp, 0x14
mov eax, dword [esp + 0x28]
mov ecx, dword [edx + 4]
and ecx, 1
or ecx, 2
add ecx, dword [edx + 4]
sub eax, ecx
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0xc], eax
mov eax, dword [edx + 4]
push esi
mov dword [ecx], eax
call fcn.00405e3a
mov ecx, dword [esp + 0x1c]
add esp, 4
jmp 0x4059df
mov dword [ebx], 0
mov dword [ebx + 0xc], 0
movzx eax, word [esp + 0x38]
inc ecx
add edi, 0x30
mov dword [esp + 0x18], ecx
add ebx, 0x10
cmp ecx, eax
mov ax, word [esp + 0x38]
jl 0x4058d0
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x14]
xor ecx, ecx
mov dword [esp + 0x24], 0
xor edx, edx
cmp cx, ax
jae 0x405a3d
mov ecx, dword [esp + 0x2c]
lea edi, [esi + 0xc]
add ecx, 0x18
xor esi, esi
sub dword [ecx], esi
lea ecx, [ecx + 0x30]
add esi, dword [edi]
lea edi, [edi + 0x10]
movzx eax, word [esp + 0x38]
inc edx
cmp edx, eax
jl 0x405a21
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x20]
mov ax, word [0x420ccc]
movq xmm0, qword [str.output.mod]
mov word [esp + 0x78], ax
mov al, byte [0x420cce]
mov byte [esp + 0x7a], al
lea eax, [esp + 0x70]
push 0x420cd0
push eax
movq qword [esp + 0x78], xmm0
call fcn.0040ac43
mov edi, eax
add esp, 8
test edi, edi
je 0x405c91
push 2
push 0
push ebx
call fcn.0040b011
add esp, 0xc
push ebx
call fcn.0040ab81
add esp, 4
push 0
push 0
push ebx
call fcn.0040b011
add esp, 0xc
mov edx, edi
mov ecx, ebx
push dword [esp + 0x60]
call fcn.00405ce0
movzx eax, word [esp + 0x3c]
add esp, 4
lea eax, [eax + eax*2]
push 1
shl eax, 4
push eax
push ebx
call fcn.0040b011
movzx eax, word [esp + 0x44]
add esp, 0xc
push edi
push eax
push 0x30
push dword [esp + 0x38]
call fcn.0040b24b
movzx eax, word [esp + 0x48]
mov edx, edi
mov ecx, dword [esp + 0x78]
lea eax, [eax + eax*2]
shl eax, 4
sub ecx, eax
sub ecx, dword [esp + 0x70]
push ecx
mov ecx, ebx
call fcn.00405ce0
xor ebx, ebx
xor eax, eax
add esp, 0x14
mov dword [esp + 0x28], ebx
cmp ax, word [esp + 0x38]
jae 0x405c44
nop dword [eax]
cmp dword [esi], 0
je 0x405b81
mov eax, dword [esi + 8]
push 1
add eax, eax
push eax
push dword [esp + 0x1c]
call fcn.0040b011
add esp, 0xc
test ebx, ebx
je 0x405b47
nop dword [eax]
mov eax, dword [esi]
push edi
push 1
push 2
push dword [eax + 8]
call fcn.0040b24b
add esp, 0x10
sub ebx, 1
jne 0x405b30
mov eax, dword [esi]
push edi
push dword [eax + 4]
push 2
push dword [eax + 8]
call fcn.0040b24b
mov eax, dword [esi]
push edi
push 1
push 2
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
lea eax, [eax + ecx*2]
add eax, 0xfffffffe
push eax
call fcn.0040b24b
mov ebx, dword [esi]
add esp, 0x20
mov ebx, dword [ebx + 4]
and ebx, 1
inc ebx
jmp 0x405c27
push dword [esp + 0x14]
lea eax, [esp + 0x14]
push 1
push 2
push eax
call fcn.0040b494
add esp, 0x10
test ebx, ebx
je 0x405bb7
nop word [eax + eax]
push edi
push 1
lea eax, [esp + 0x18]
push 2
push eax
call fcn.0040b24b
add esp, 0x10
sub ebx, 1
jne 0x405ba0
push edi
push 1
lea eax, [esp + 0x18]
push 2
push eax
call fcn.0040b24b
mov eax, dword [esi + 8]
xor ecx, ecx
dec eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405fa0
mov ebx, dword [esp + 0x34]
add esp, 0x14
mov esi, eax
push dword [esp + 0x14]
mov ecx, dword [ebx + 8]
dec ecx
push ecx
push 2
push esi
call fcn.0040b494
mov ecx, dword [ebx + 8]
xor ebx, ebx
push edi
mov ax, word [esi + ecx*2 - 4]
cmp ax, word [esi + ecx*2 - 6]
sete bl
inc ebx
sub ecx, ebx
dec ecx
push ecx
push 2
push esi
call fcn.0040b24b
push esi
call fcn.00405e3a
mov esi, dword [esp + 0x44]
add esp, 0x24
mov ecx, dword [esp + 0x28]
add esi, 0x10
movzx eax, word [esp + 0x38]
inc ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], esi
cmp ecx, eax
jl 0x405b10
mov ebx, dword [esp + 0x14]
push 0
push 0x10
push ebx
call fcn.0040b011
add esp, 0xc
lea eax, [esp + 0x18]
push ebx
push 1
push 4
push eax
call fcn.0040b494
mov eax, dword [esp + 0x34]
sub dword [esp + 0x28], eax
push 0
push 0x10
push edi
call fcn.0040b011
add esp, 0x1c
lea eax, [esp + 0x18]
push edi
push 1
push 4
push eax
call fcn.0040b24b
push edi
call fcn.0040acd1
add esp, 0x14
push dword [esp + 0x2c]
call fcn.00405e3a
add esp, 4
push ebx
call fcn.0040acd1
add esp, 4
lea eax, [esp + 0x70]
push eax
push 0x420cd4
jmp 0x405cba
push dword [esi + 4]
push str.Cannot_open_file__s_n
call fcn.004057c0
mov ecx, dword [esp + 0x84]
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00405e2c
mov esp, ebp
pop ebp
ret