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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1004c5c9
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x100611cc]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x100611cc]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], ecx
push eax
lea ecx, [esp + 0x70]
mov edi, edx
call fcn.10002418
xor ebx, ebx
push esi
lea ecx, [esp + 0x54]
mov dword [esp + 0x9c], ebx
call fcn.10002418
lea eax, [esp + 0x6c]
call fcn.100207cd
lea eax, [esp + 0x50]
call fcn.100207cd
cmp dword [esp + 0x84], 0x10
mov eax, dword [esp + 0x70]
jae 0x10004d36
lea eax, [esp + 0x70]
cmp dword [esp + 0x68], 0x10
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x54]
jae 0x10004d49
lea eax, [esp + 0x54]
mov dword [esp + 0x30], eax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
push dword [esp + 0x34]
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x44]
mov byte [esp + 0x9c], 2
call fcn.1001f5b0
pop ecx
push ebx
push 0xe00
push 1
lea eax, [esp + 0x4c]
push eax
add edi, 0xc
push edi
call fcn.100200fa
mov edi, eax
add esp, 0x14
cmp edi, ebx
mov dword [esp + 0x34], edi
jne 0x10004db5
push 0x66
pop eax
mov ecx, str.Failed_to_find_or_create_array_node
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
push 0x10058310
lea eax, [esp + 0x2c]
push eax
call fcn.1003a718
mov esi, dword [edi + 4]
mov ebx, 0x1000
test ebx, esi
jne 0x10004de1
lea eax, [edi + 0x44]
call fcn.1000250f
test eax, eax
jne 0x10004e8f
test si, 0x800
je 0x10004e8f
or esi, ebx
mov dword [edi + 4], esi
and dword [esp + 0x38], 0
and dword [esp + 0x1c], 0
lea eax, [edi + 0x44]
mov byte [esp + 0x17], 0
mov dword [esp + 0x20], eax
call fcn.1000250f
test eax, eax
mov dword [esp + 0x28], eax
jbe 0x10004f06
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
call fcn.10002522
mov edi, dword [eax]
lea ebx, [edi + 0x54]
mov eax, ebx
call fcn.1000250f
test eax, eax
je 0x10004f7d
mov eax, ebx
call fcn.1000250f
test eax, eax
ja 0x10004e39
call fcn.10036494
mov eax, dword [ebx + 4]
mov esi, dword [eax]
add esi, 8
push str.xml:lang
call fcn.10005735
test al, al
pop ecx
je 0x10004f7d
mov eax, ebx
call fcn.1000250f
test eax, eax
ja 0x10004e64
call fcn.10036494
mov ebx, dword [ebx + 4]
mov esi, dword [ebx]
push str.x_default
add esi, 0x24
call fcn.10005735
test al, al
pop ecx
jne 0x10004ead
inc dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x28]
jb 0x10004e08
jmp 0x10004f02
push 0x66
pop eax
mov ecx, str.Localized_text_array_is_not_alt_text
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
push 0x10058310
lea eax, [esp + 0x2c]
jmp 0x10004daf
mov esi, dword [esp + 0x1c]
test esi, esi
mov dword [esp + 0x38], edi
mov byte [esp + 0x17], 1
je 0x10004f02
mov edi, dword [esp + 0x20]
mov eax, edi
call fcn.1000250f
test eax, eax
ja 0x10004ed2
call fcn.10036494
mov eax, dword [edi + 4]
mov eax, dword [eax]
mov dword [esp + 0x28], eax
mov eax, edi
call fcn.1000250f
test eax, eax
ja 0x10004eeb
call fcn.10036494
mov ebx, dword [edi + 4]
call fcn.10002522
mov eax, dword [eax]
mov dword [ebx], eax
call fcn.10002522
mov ecx, dword [esp + 0x28]
mov dword [eax], ecx
mov edi, dword [esp + 0x34]
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x34]
mov eax, edi
push dword [esp + 0x44]
call fcn.10003e80
add esp, 0xc
push str.x_default
push dword [esp + 0x34]
mov byte [esp + 0x2f], al
call fcn.10036710
mov ebx, eax
movzx eax, byte [esp + 0x2f]
neg ebx
sbb bl, bl
xor esi, esi
pop ecx
inc bl
sub eax, esi
pop ecx
je 0x10005072
dec eax
je 0x1000501e
dec eax
je 0x10004fe4
dec eax
je 0x10004fc1
dec eax
je 0x10004f9b
dec eax
je 0x10004fc1
push 9
pop eax
mov ecx, str.Unexpected_result_from_ChooseLocalizedText
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
push 0x10058310
lea eax, [esp + 0x2c]
jmp 0x10004daf
push 0x66
pop eax
mov ecx, str.Language_qualifier_must_be_first
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
push 0x10058310
lea eax, [esp + 0x2c]
jmp 0x10004daf
mov eax, dword [esp + 0x20]
call fcn.1000250f
cmp eax, 1
jne 0x1000508d
push dword [esp + 0x18]
push dword [esp + 0x3c]
call fcn.10003b9f
pop ecx
pop ecx
jmp 0x1000508d
push dword [esp + 0x18]
mov ecx, edi
push dword [esp + 0x34]
call fcn.1000418c
test bl, bl
pop ecx
pop ecx
je 0x1000509e
mov byte [esp + 0x17], 1
jmp 0x1000509e
cmp byte [esp + 0x17], 0
mov esi, dword [esp + 0x3c]
je 0x10005012
mov ebx, dword [esp + 0x38]
cmp ebx, esi
je 0x10005012
lea eax, [esi + 0x24]
lea ecx, [ebx + 0x24]
call fcn.10005758
test al, al
je 0x10005012
push dword [esp + 0x18]
push ebx
call fcn.10003b9f
pop ecx
pop ecx
push dword [esp + 0x18]
push esi
call fcn.10003b9f
jmp 0x1000509c
test bl, bl
je 0x10004fe4
mov eax, dword [esp + 0x20]
call fcn.1000250f
mov ebx, eax
cmp ebx, esi
jbe 0x10005068
mov edi, dword [esp + 0x20]
call fcn.10002522
mov edi, dword [eax]
mov eax, dword [esp + 0x38]
cmp edi, eax
je 0x1000505f
add eax, 0x24
lea ecx, [edi + 0x24]
call fcn.10005758
test al, al
je 0x1000505f
push dword [esp + 0x18]
push edi
call fcn.10003b9f
pop ecx
pop ecx
inc esi
cmp esi, ebx
jb 0x10005031
mov edi, dword [esp + 0x34]
push dword [esp + 0x18]
push dword [esp + 0x3c]
jmp 0x10005017
push dword [esp + 0x18]
mov ecx, edi
push str.x_default
call fcn.1000418c
test bl, bl
pop ecx
pop ecx
mov byte [esp + 0x17], 1
jne 0x100050c5
push dword [esp + 0x18]
mov ecx, edi
push dword [esp + 0x34]
call fcn.1000418c
pop ecx
pop ecx
cmp byte [esp + 0x17], 0
jne 0x100050c5
mov eax, dword [esp + 0x20]
call fcn.1000250f
cmp eax, 1
jne 0x100050c5
push dword [esp + 0x18]
mov ecx, edi
push str.x_default
call fcn.1000418c
pop ecx
pop ecx
lea esi, [esp + 0x40]
call fcn.10002b10
push 0
push 1
lea ecx, [esp + 0x58]
call fcn.10002a77
push 0
push 1
lea ecx, [esp + 0x74]
call fcn.10002a77
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.1003635b
mov esp, ebp
pop ebp
ret 0x10