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

Disassembly:
sub esp, 0x21c
mov eax, dword [0x1001c3d0]
push esi
push edi
mov edi, dword [esp + 0x228]
mov dword [esp + 0x220], eax
mov eax, edi
shr eax, 0x10
cmp eax, 8
mov esi, ecx
jbe 0x100059c3
pop edi
mov eax, 0x826a0008
pop esi
mov ecx, dword [esp + 0x218]
call fcn.1000d8e6
add esp, 0x21c
ret 4
push ebx
lea ecx, [esp + 0x10]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
mov ecx, esi
call fcn.10001610
xor ebx, ebx
cmp eax, ebx
jl 0x10005ece
cmp dword [esp + 0x10], 0x200
je 0x10005a0b
pop ebx
pop edi
mov eax, 0x826a0001
pop esi
mov ecx, dword [esp + 0x218]
call fcn.1000d8e6
add esp, 0x21c
ret 4
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esi + 0xf0], ecx
mov ecx, dword [esp + 0x38]
mov dword [esi + 0xd0], eax
mov dword [esp + 0x14], eax
shl eax, 6
mov dword [esi + 0xc8], edi
mov dword [esi + 0xdc], edx
mov edx, dword [esp + 0x4c]
mov dword [esi + 0xe4], ecx
mov ecx, dword [esp + 0x50]
mov edi, eax
push ebp
push edi
mov dword [esi + 0xc4], 0x30
mov dword [esi + 0xcc], 1
mov dword [esi + 0xd4], 0x40000
mov dword [esi + 0xd8], 0xc8
mov dword [esi + 0xe0], 0x3e8
mov dword [esi + 0xe8], edx
mov dword [esi + 0xec], ecx
call fcn.1000d8f9
add esp, 4
lea edx, [esp + 0x14]
push edx
mov ebp, eax
push edi
push ebp
mov ecx, esi
mov dword [esp + 0x30], ebp
call fcn.10001610
cmp eax, ebx
mov dword [esp + 0x10], eax
jge 0x10005ac8
cmp ebp, ebx
je 0x10005ecd
push ebp
call fcn.1000d8f4
mov eax, dword [esp + 0x14]
add esp, 4
jmp 0x10005ecd
cmp dword [esp + 0x14], edi
je 0x10005ae5
cmp ebp, ebx
je 0x10005adb
push ebp
call fcn.1000d8f4
add esp, 4
mov eax, 0x826a0001
jmp 0x10005ecd
mov eax, dword [esi + 0x1ba8]
cmp eax, ebx
je 0x10005afe
push eax
call fcn.1000d8f4
add esp, 4
mov dword [esi + 0x1ba8], ebx
mov ecx, dword [0x10017c38]
mov edi, dword [esp + 0x18]
lea eax, [esi + 0x130]
mov dword [eax], ecx
mov edx, dword [0x10017c3c]
mov dword [eax + 4], edx
mov ecx, dword [0x10017c40]
mov dword [eax + 8], ecx
mov edx, dword [0x10017c44]
mov ecx, dword [esp + 0x50]
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x34]
mov dword [esi + 0x140], eax
mov dword [esi + 0x158], ecx
mov dword [esi + 0x144], ebx
mov dword [esi + 0x148], ebx
mov dword [esi + 0x14c], ebx
mov dword [esi + 0x150], ebx
mov dword [esi + 0x154], ebx
mov dword [esi + 0x15c], ebx
mov dword [esi + 0x160], ebx
mov dword [esi + 0x164], ebx
mov dword [esi + 0x168], ebx
mov dword [esi + 0x16c], ebx
mov dword [esi + 0x170], ebx
mov dword [esi + 0x17c], ebx
mov dword [esi + 0x174], 0x10
mov dword [esi + 0x178], 0x10000
mov dword [esi + 0x180], edx
mov dword [esi + 0x184], ebx
mov ecx, dword [0x100177b0]
lea eax, [esi + 0x388]
mov dword [eax], ecx
mov edx, dword [0x100177b4]
mov dword [eax + 4], edx
mov ecx, dword [0x100177b8]
mov dword [eax + 8], ecx
mov edx, dword [0x100177bc]
mov dword [eax + 0xc], edx
mov eax, edi
shl eax, 7
lea ecx, [eax + 8]
push eax
mov dword [esi + 0x398], ecx
mov dword [esi + 0x39c], ebx
mov dword [esi + 0x3a0], ebx
mov dword [esi + 0x3a4], edi
call fcn.1000d8f9
mov dword [esi + 0x1ba8], eax
mov eax, 1
add esp, 4
cmp edi, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
jbe 0x10005d5b
mov edx, dword [esp + 0x18]
xor edi, edi
mov dword [esp + 0x18], edx
jmp 0x10005c30
mov eax, dword [esi + 0x1ba8]
mov dword [edi + eax + 0x70], ebx
mov ecx, dword [esi + 0x1ba8]
mov edx, dword [esi + 0xe8]
mov dword [edi + ecx + 0x74], edx
mov eax, dword [esi + 0x1ba8]
mov dword [edi + eax + 0x7c], ebx
mov ecx, dword [esi + 0x1ba8]
mov dword [edi + ecx + 0x78], ebx
mov edx, dword [esi + 0x1ba8]
mov word [edi + edx], bx
mov eax, dword [esi + 0x1ba8]
mov cx, word [ebp + 0x16]
mov word [edi + eax + 2], cx
mov edx, dword [esi + 0x1ba8]
mov eax, dword [ebp]
mov dword [edi + edx + 4], eax
mov ecx, dword [esi + 0x1ba8]
mov dword [edi + ecx + 8], 0xffffffff
mov edx, dword [esi + 0x1ba8]
mov dword [edi + edx + 0xc], ebx
mov eax, dword [esi + 0x1ba8]
mov dword [edi + eax + 0x10], 1
mov ecx, dword [esi + 0x1ba8]
mov dword [edi + ecx + 0x14], ebx
mov edx, dword [esi + 0x1ba8]
add edx, edi
push edx
push ebp
call fcn.10004570
mov eax, dword [esi + 0x1ba8]
movzx ecx, word [eax + edi + 2]
add eax, edi
add esp, 8
dec ecx
je 0x10005d20
dec ecx
je 0x10005cff
sub ecx, 2
jne 0x10005d3f
mov ecx, dword [esp + 0x20]
push ecx
add eax, 0x1c
push str.Video__02d
push eax
call fcn.1000dfa2
mov eax, dword [esp + 0x2c]
add esp, 0xc
inc eax
mov dword [esp + 0x20], eax
jmp 0x10005d3f
mov edx, dword [esp + 0x1c]
push edx
add eax, 0x1c
push str.Audio__02d
push eax
call fcn.1000dfa2
mov eax, dword [esp + 0x28]
add esp, 0xc
inc eax
mov dword [esp + 0x1c], eax
jmp 0x10005d3f
mov ecx, dword [esp + 0x10]
push ecx
add eax, 0x1c
push str.Screen__02d
push eax
call fcn.1000dfa2
mov eax, dword [esp + 0x1c]
add esp, 0xc
inc eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
add ebp, 0x40
add edi, 0x80
dec eax
mov dword [esp + 0x18], eax
jne 0x10005c30
mov ebp, dword [esp + 0x24]
cmp ebp, ebx
je 0x10005d68
push ebp
call fcn.1000d8f4
add esp, 4
mov eax, dword [esi + 0x1bbc]
cmp eax, ebx
je 0x10005d81
push eax
call fcn.1000d8f4
add esp, 4
mov dword [esi + 0x1bbc], ebx
mov edx, dword [esp + 0x48]
push edx
mov ecx, esi
call fcn.10001560
mov edi, eax
cmp edi, ebx
jge 0x10005db3
mov eax, dword [esi + 0x1ba8]
cmp eax, ebx
je 0x10005dac
push eax
call fcn.1000d8f4
add esp, 4
mov dword [esi + 0x1ba8], ebx
mov eax, edi
jmp 0x10005ecd
mov ebp, dword [esp + 0x3c]
lea edi, [ebp*4]
push edi
call fcn.1000d8f9
add esp, 4
xor edx, edx
lea ecx, [ebp*8]
add ecx, 0x18
mov dword [esi + 0x3b8], ecx
lea ecx, [esp + 0x14]
push ecx
push edi
adc edx, ebx
push eax
mov ecx, esi
mov dword [esi + 0x1bbc], eax
mov dword [esi + 0x3bc], edx
mov dword [esi + 0x3d0], 0x3e8
mov dword [esi + 0x3d4], ebp
call fcn.10001610
mov ebp, eax
cmp ebp, ebx
jge 0x10005e44
mov eax, dword [esi + 0x1ba8]
cmp eax, ebx
je 0x10005e24
push eax
call fcn.1000d8f4
add esp, 4
mov dword [esi + 0x1ba8], ebx
mov eax, dword [esi + 0x1bbc]
cmp eax, ebx
je 0x10005e3d
push eax
call fcn.1000d8f4
add esp, 4
mov dword [esi + 0x1bbc], ebx
mov eax, ebp
jmp 0x10005ecd
cmp dword [esp + 0x14], edi
je 0x10005e83
mov eax, dword [esi + 0x1ba8]
cmp eax, ebx
je 0x10005e63
push eax
call fcn.1000d8f4
add esp, 4
mov dword [esi + 0x1ba8], ebx
mov eax, dword [esi + 0x1bbc]
cmp eax, ebx
je 0x10005e7c
push eax
call fcn.1000d8f4
add esp, 4
mov dword [esi + 0x1bbc], ebx
mov eax, 0x826a0001
jmp 0x10005ecd
mov edx, dword [esp + 0x4c]
push edx
mov ecx, esi
call fcn.10001560
mov edi, eax
cmp edi, ebx
jge 0x10005ecb
mov eax, dword [esi + 0x1ba8]
cmp eax, ebx
je 0x10005eae
push eax
call fcn.1000d8f4
add esp, 4
mov dword [esi + 0x1ba8], ebx
mov eax, dword [esi + 0x1bbc]
cmp eax, ebx
je 0x10005ec7
push eax
call fcn.1000d8f4
add esp, 4
mov dword [esi + 0x1bbc], ebx
mov eax, edi
jmp 0x10005ecd
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x224]
pop ebx
pop edi
pop esi
call fcn.1000d8e6
add esp, 0x21c
ret 4