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

Disassembly:
push 0xffffffffffffffff
push 0x53d3b8
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x577830]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x577830]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
mov eax, dword [esp + 0x9c]
mov ebp, dword [esp + 0x94]
mov ebx, dword [esp + 0x98]
mov dword [esp + 0x1c], eax
mov edi, 0xf
mov eax, ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], 0
mov byte [esp + 0x64], 0
lea esi, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x50b0b0
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x68]
call fcn.004fee90
xor eax, eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x58], eax
mov byte [esp + 0x48], al
mov eax, str.x_default
mov dword [esp + 0x5c], edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x50b0e3
sub eax, edx
push eax
push str.x_default
lea ecx, [esp + 0x4c]
call fcn.004fee90
lea eax, [esp + 0x60]
call fcn.00503070
lea eax, [esp + 0x44]
call fcn.00503070
mov eax, 0x10
cmp dword [esp + 0x78], eax
jb 0x50b124
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x30], ecx
jmp 0x50b12c
lea edx, [esp + 0x64]
mov dword [esp + 0x30], edx
cmp dword [esp + 0x5c], eax
jb 0x50b13c
mov eax, dword [esp + 0x48]
mov dword [esp + 0x28], eax
jmp 0x50b144
lea ecx, [esp + 0x48]
mov dword [esp + 0x28], ecx
xor esi, esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov ecx, dword [esp + 0x1c]
push ebx
lea edx, [esp + 0x38]
mov byte [esp + 0x90], 2
call fcn.00501c00
add esp, 4
push esi
push 0xe00
push 1
lea edx, [esp + 0x40]
push edx
add ebp, 0x50
push ebp
call fcn.00502c20
mov ebp, eax
add esp, 0x14
cmp ebp, esi
jne 0x50b1ab
mov eax, 0x66
mov dword [esp + 0x20], eax
push 0x5725f8
lea eax, [esp + 0x24]
mov ecx, str.Failed_to_find_or_create_array_node
push eax
mov dword [esp + 0x2c], ecx
call fcn.00513696
mov eax, dword [ebp + 4]
test eax, 0x1000
jne 0x50b1dd
mov ecx, dword [ebp + 0x48]
cmp ecx, esi
je 0x50b1ca
mov edx, dword [ebp + 0x4c]
sub edx, ecx
sar edx, 2
jne 0x50b2b1
test eax, 0x800
je 0x50b2b1
or eax, 0x1000
mov dword [ebp + 4], eax
mov eax, dword [ebp + 0x48]
xor edi, edi
cmp eax, esi
mov dword [esp + 0x1c], esi
mov byte [esp + 0x17], 0
je 0x50b364
mov ebx, dword [ebp + 0x4c]
sub ebx, eax
sar ebx, 2
je 0x50b364
mov ecx, dword [ebp + 0x48]
cmp ecx, esi
je 0x50b214
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x50b219
call fcn.005143e1
mov ecx, dword [ebp + 0x48]
mov esi, dword [ecx + edi*4]
mov eax, dword [esi + 0x58]
test eax, eax
je 0x50b3a0
mov edx, dword [esi + 0x5c]
sub edx, eax
sar edx, 2
je 0x50b3a0
test eax, eax
je 0x50b246
mov ecx, dword [esi + 0x5c]
sub ecx, eax
sar ecx, 2
jne 0x50b24b
call fcn.005143e1
mov eax, dword [esi + 0x58]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x1c]
push 8
add ecx, 8
push str.xml:lang
push 0
call fcn.004fe8b0
test eax, eax
jne 0x50b3a0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x50b27d
mov edx, dword [esi + 0x5c]
sub edx, eax
sar edx, 2
jne 0x50b282
call fcn.005143e1
mov eax, dword [esi + 0x58]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x38]
push 9
add ecx, 0x24
push str.x_default
push 0
call fcn.004fe8b0
test eax, eax
je 0x50b2d2
add edi, 1
cmp edi, ebx
jae 0x50b364
xor esi, esi
jmp 0x50b201
mov eax, 0x66
mov dword [esp + 0x20], eax
push 0x5725f8
lea eax, [esp + 0x24]
mov ecx, str.Localized_text_array_is_not_alt_text
push eax
mov dword [esp + 0x2c], ecx
call fcn.00513696
test edi, edi
mov dword [esp + 0x1c], esi
mov byte [esp + 0x17], 1
je 0x50b364
mov eax, dword [ebp + 0x48]
test eax, eax
je 0x50b2f4
mov ecx, dword [ebp + 0x4c]
sub ecx, eax
sar ecx, 2
jne 0x50b2f9
call fcn.005143e1
mov edx, dword [ebp + 0x48]
mov eax, dword [edx]
mov ecx, edx
test ecx, ecx
mov dword [esp + 0x2c], eax
je 0x50b314
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x50b319
call fcn.005143e1
mov esi, dword [ebp + 0x48]
mov eax, dword [ebp + 0x48]
lea ebx, [edi*4]
add esi, ebx
test eax, eax
je 0x50b336
mov ecx, dword [ebp + 0x4c]
sub ecx, eax
sar ecx, 2
jne 0x50b33b
call fcn.005143e1
mov edx, dword [ebp + 0x48]
mov eax, dword [esi]
mov dword [edx], eax
mov ecx, dword [ebp + 0x48]
test ecx, ecx
je 0x50b355
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x50b35a
call fcn.005143e1
mov ecx, dword [ebp + 0x48]
mov edx, dword [esp + 0x2c]
mov dword [ebx + ecx], edx
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x30]
push eax
push esi
push ecx
push ebp
call fcn.0050a570
add esp, 0x10
xor edx, edx
mov edi, str.x_default
mov ecx, 0xa
repe cmpsb byte [esi], byte es:[edi]
movzx eax, al
sete bl
cmp eax, 5
ja case.default.0x50b399
jmp dword [eax*4 + 0x50b62c]
mov eax, 0x66
mov dword [esp + 0x20], eax
push 0x5725f8
lea eax, [esp + 0x24]
mov ecx, str.Language_qualifier_must_be_first
push eax
mov dword [esp + 0x2c], ecx
call fcn.00513696
mov eax, dword [esp + 0x18]
push eax
push str.x_default
push ebp
call fcn.0050aa40
add esp, 0xc
test bl, bl
jne 0x50b55a
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
push ecx
push edx
jmp 0x50b551
test bl, bl
jne 0x50b42b
cmp byte [esp + 0x17], bl
mov edi, dword [esp + 0x30]
je 0x50b41b
mov esi, dword [esp + 0x1c]
cmp esi, edi
je 0x50b41b
lea eax, [edi + 0x24]
lea ecx, [esi + 0x24]
call fcn.00500480
test al, al
je 0x50b41b
mov ecx, dword [esp + 0x18]
mov edx, esi
call fcn.0050a0e0
mov ecx, dword [esp + 0x18]
mov edx, edi
call fcn.0050a0e0
jmp 0x50b52c
mov eax, dword [ebp + 0x48]
xor edi, edi
test eax, eax
je 0x50b487
mov ebx, dword [ebp + 0x4c]
sub ebx, eax
sar ebx, 2
je 0x50b487
mov edi, edi
mov ecx, dword [ebp + 0x48]
test ecx, ecx
je 0x50b453
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x50b458
call fcn.005143e1
mov eax, dword [ebp + 0x48]
mov esi, dword [eax + edi*4]
mov eax, dword [esp + 0x1c]
cmp esi, eax
je 0x50b480
add eax, 0x24
lea ecx, [esi + 0x24]
call fcn.00500440
test al, al
jne 0x50b480
mov ecx, dword [esp + 0x18]
mov edx, esi
call fcn.0050a0e0
add edi, 1
cmp edi, ebx
jb 0x50b440
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
call fcn.0050a0e0
jmp 0x50b52c
cmp byte [esp + 0x17], 0
mov edi, dword [esp + 0x30]
je 0x50b4c6
mov esi, dword [esp + 0x1c]
cmp esi, edi
je 0x50b4c6
lea eax, [edi + 0x24]
lea ecx, [esi + 0x24]
call fcn.00500480
test al, al
je 0x50b4c6
mov ecx, dword [esp + 0x18]
mov edx, esi
call fcn.0050a0e0
mov ecx, dword [esp + 0x18]
mov edx, edi
call fcn.0050a0e0
jmp 0x50b52c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
push ecx
push edx
jmp 0x50b51f
mov ecx, dword [ebp + 0x48]
test ecx, ecx
je 0x50b500
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp eax, 1
jne 0x50b500
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
call fcn.0050a0e0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
push eax
push ecx
push ebp
call fcn.0050aa40
add esp, 0xc
jmp 0x50b52c
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
push edx
push eax
push ebp
call fcn.0050aa40
add esp, 0xc
test bl, bl
jne 0x50b55a
cmp byte [esp + 0x17], 0
jne 0x50b55a
mov ecx, dword [ebp + 0x48]
test ecx, ecx
je 0x50b55a
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp eax, 1
jne 0x50b55a
mov ecx, dword [esp + 0x18]
push ecx
push str.x_default
push ebp
call fcn.0050aa40
add esp, 0xc
mov byte [esp + 0x8c], 1
mov eax, dword [esp + 0x38]
xor esi, esi
cmp eax, esi
je 0x50b58a
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x3c]
push edx
call fcn.00500810
mov eax, dword [esp + 0x3c]
add esp, 4
push eax
call fcn.00511cfe
add esp, 4
mov edi, 0x10
mov byte [esp + 0x8c], 0
cmp dword [esp + 0x5c], edi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
jb 0x50b5b6
mov ecx, dword [esp + 0x48]
push ecx
call fcn.00511cfe
add esp, 4
mov dword [esp + 0x8c], 0xffffffff
cmp dword [esp + 0x78], edi
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], esi
mov byte [esp + 0x48], 0
jb 0x50b5e5
mov edx, dword [esp + 0x64]
push edx
call fcn.00511cfe
add esp, 4
mov ecx, dword [esp + 0x84]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.005120db
add esp, 0x7c
ret 0xc
mov eax, 9
mov dword [esp + 0x20], eax
push 0x5725f8
lea eax, [esp + 0x24]
mov ecx, str.Unexpected_result_from_ChooseLocalizedText
push eax
mov dword [esp + 0x2c], ecx
call fcn.00513696
mov edi, edi
sal dword [ebx - 0x4c14ffb0], 0x50
add byte [ecx - 754954060], bl
mov ah, 0x50
add bh, bl
mov ah, 0x50
add byte [0xcc0050b5], dl
int3