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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa8
mov edx, ecx
mov ecx, dword [ecx + 4]
mov eax, dword [edx + 0xc]
cmp ecx, 1
je 0x509c60
test ecx, ecx
jne 0x509c64
test eax, eax
jne 0x509c64
mov esi, str.OutOfRangeImpossibleNotEnoughInvalidTooShortTooLongBadFormat__NonexhaustiveEmpty
xor ecx, ecx
jmp 0x509c7f
test eax, eax
je 0x509c78
lea esi, [esp + 0x54]
mov ecx, esi
call fcn.00415f40
mov eax, dword [esi]
mov edi, dword [esi + 8]
mov esi, eax
jmp 0x509ca1
mov eax, dword [edx]
mov esi, dword [eax]
mov ecx, dword [eax + 4]
mov edi, ecx
call fcn.004ba184
mov ebx, edx
push edi
push esi
mov esi, eax
push eax
call fcn.004f7e80
add esp, 0xc
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], edi
lea ebx, [esp + 0x60]
mov ecx, ebx
mov edx, esi
push 9
push 0x54708b
push edi
call fcn.00426a30
add esp, 0xc
cmp dword [ebx], 0
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], esi
je 0x509f2d
mov ebx, dword [esp + 0x84]
mov edx, dword [esp + 0x9c]
mov ecx, dword [esp + 0x74]
mov esi, edx
not esi
mov eax, ecx
sub eax, edx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 8], eax
mov edi, dword [esp + 0x68]
mov dword [esp + 0x44], edi
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x40], edi
mov eax, dword [esp + 0x80]
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x78]
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0x88]
mov dword [esp + 0x3c], esi
mov eax, dword [esp + 0x20]
add esi, eax
mov dword [esp + 0x38], esi
mov eax, dword [esp + 8]
add eax, ecx
mov dword [esp + 0x30], eax
mov eax, edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], ecx
cmp ecx, eax
mov esi, eax
cmovb esi, ecx
cmp ebx, 0xffffffff
cmove esi, ecx
mov dword [esp + 0x2c], eax
cmove eax, edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], esi
lea eax, [esi - 1]
mov dword [esp + 0x50], eax
mov ecx, edi
mov eax, ecx
sub eax, edx
cmp eax, dword [esp + 4]
jae 0x50a0f1
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x20]
mov cl, byte [ecx + eax]
xor eax, eax
xor esi, esi
inc esi
shld eax, esi, cl
shl esi, cl
test cl, 0x20
cmovne eax, esi
mov ecx, 0
cmovne esi, ecx
and eax, dword [esp + 0x40]
and esi, dword [esp + 0x44]
or esi, eax
je 0x509e76
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x1c]
lea esi, [eax + ecx]
mov eax, dword [esp + 0x38]
lea edi, [eax + ecx]
mov ebx, dword [esp + 0x48]
mov ecx, ebx
sub ecx, 1
jb 0x509e21
cmp dword [esp + 0x50], edx
jae 0x50a17c
lea eax, [esi + ebx]
cmp eax, dword [esp + 4]
jae 0x50a183
mov eax, dword [esp + 8]
mov al, byte [eax + ebx - 1]
cmp al, byte [edi + ebx]
mov ebx, ecx
je 0x509ddb
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x18]
add eax, ecx
mov ecx, eax
mov ebx, dword [esp + 0x28]
cmp ebx, 0xffffffff
je 0x509d7e
jmp 0x509e8d
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x1c]
add ecx, eax
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x18]
cmp esi, dword [esp + 0x4c]
jae 0x509e9a
cmp esi, edx
jae 0x50a190
cmp ecx, dword [esp + 4]
jae 0x50a1a0
mov bl, byte [eax]
inc eax
inc esi
mov edi, dword [esp + 0x20]
cmp bl, byte [edi + ecx]
lea ecx, [ecx + 1]
je 0x509e33
mov ecx, dword [esp + 0x1c]
sub ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
cmp ebx, 0xffffffff
je 0x509d7e
mov eax, dword [esp + 0x24]
jmp 0x509e8f
cmp ebx, 0xffffffff
mov eax, dword [esp + 0x2c]
cmovne eax, edx
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
jmp 0x509d59
mov eax, edx
mov edi, ecx
mov ecx, dword [esp + 0x18]
jmp 0x509d59
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
lea edi, [eax + 9]
mov dword [esp + 4], edi
mov ecx, esi
mov edx, dword [esp + 0x14]
push 0x547140
push edi
call fcn.00439dcf
pop ecx
pop ecx
test edx, edx
je 0x509ecf
mov al, byte [eax]
add al, 0xd0
cmp al, 0xa
jae 0x509ecf
inc edi
jmp 0x509ead
mov ecx, esi
mov edx, dword [esp + 0x14]
push 0x547150
push edi
call fcn.00439dcf
pop ecx
pop ecx
mov ecx, eax
push 8
push 0x547094
call fcn.004c2f2b
pop ecx
pop edx
xor ebx, ebx
test al, al
je 0x50a075
lea ebx, [edi + 8]
mov dword [esp + 8], ebx
mov ecx, esi
mov edx, dword [esp + 0x14]
push 0x547160
push ebx
call fcn.00439dcf
pop ecx
pop ecx
test edx, edx
je 0x50a021
mov al, byte [eax]
add al, 0xd0
cmp al, 0xa
jae 0x50a021
inc ebx
jmp 0x509f03
mov al, byte [esp + 0x6e]
mov byte [esp + 4], al
mov edi, dword [esp + 0x90]
mov eax, dword [esp + 0x94]
mov dword [esp + 8], eax
mov bh, byte [esp + 0x6d]
mov eax, dword [esp + 0x68]
cmp byte [esp + 4], 0
jne 0x50a073
test eax, eax
je 0x50a069
cmp eax, dword [esp + 8]
jae 0x509f73
cmp byte [edi + eax], 0xbf
jg 0x509f79
jmp 0x50a1b8
jne 0x50a1b8
mov bl, byte [edi + eax - 1]
test bl, bl
mov dword [esp + 0x10], eax
js 0x509f8a
movzx edx, bl
jmp 0x509fda
mov ecx, edi
mov edi, eax
movzx eax, byte [ecx + eax - 2]
cmp al, 0xc0
jge 0x509fb7
movzx edx, byte [ecx + edi - 3]
cmp dl, 0xc0
jge 0x509fbe
movzx esi, byte [ecx + edi - 4]
and esi, 7
shl esi, 6
and edx, 0x3f
or edx, esi
mov esi, dword [esp + 0xc]
jmp 0x509fc1
and eax, 0x1f
mov edi, ecx
jmp 0x509fcb
and edx, 0xf
mov edi, ecx
shl edx, 6
and eax, 0x3f
or eax, edx
shl eax, 6
and bl, 0x3f
movzx edx, bl
or edx, eax
mov eax, dword [esp + 0x10]
test bh, bh
jne 0x509ea2
cmp edx, 0x110000
je 0x50a073
xor eax, eax
dec eax
cmp edx, 0x80
jb 0x50a012
push 0xfffffffffffffffe
pop eax
cmp edx, 0x800
jb 0x50a012
xor eax, eax
cmp edx, 0x10000
setb al
or eax, 0xfffffffc
mov ecx, dword [esp + 0x10]
add ecx, eax
mov eax, ecx
mov bh, 1
jmp 0x509f4f
mov esi, dword [esp + 0x14]
cmp ebx, esi
jb 0x50a05d
mov ecx, dword [esp + 0xc]
mov edx, esi
push 0x547170
push edi
push dword [esp + 0xc]
call fcn.004c228c
add esp, 0xc
mov edi, edx
lea ecx, [esp + 0x60]
mov edx, eax
push edi
call fcn.00429240
pop eax
lea eax, [esp + 0x60]
cmp byte [eax], 0
je 0x50a0fe
xor ecx, ecx
mov edi, esi
mov esi, dword [esp + 0xc]
xor ebx, ebx
jmp 0x50a07b
xor eax, eax
test bh, bh
jne 0x509ea2
xor ebx, ebx
xor ecx, ecx
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x58]
cmp eax, edi
mov dword [esp + 4], ecx
jbe 0x50a0ce
mov dword [esp + 8], ebx
test edi, edi
mov ebx, edi
je 0x50a0ac
mov ecx, esi
mov edx, eax
mov edi, ebx
push ebx
push 1
call fcn.004155f0
pop ecx
pop edx
mov ebx, eax
test eax, eax
jne 0x50a0bc
xor ecx, ecx
inc ecx
jmp 0x50a0c3
mov edi, ebx
xor ebx, ebx
inc ebx
mov ecx, esi
mov edx, ebx
push eax
call fcn.00404f8c
pop eax
mov ecx, 0x80000001
mov esi, ebx
mov ebx, dword [esp + 8]
mov edx, edi
call fcn.00404ae3
push 0x14
pop ecx
call fcn.004c1369
and dword [eax], 0
mov dword [eax + 4], esi
mov dword [eax + 8], edi
mov ecx, dword [esp + 4]
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
xor ecx, ecx
mov esi, dword [esp + 0xc]
jmp 0x50a077
lea edi, [esp + 0x60]
mov eax, dword [edi + 4]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0xc]
mov edx, esi
push 0x547180
push ebx
push dword [esp + 0x10]
call fcn.004c228c
add esp, 0xc
mov ebx, edx
mov ecx, edi
mov edx, eax
push ebx
call fcn.00429240
pop eax
cmp byte [edi], 0
mov edi, esi
je 0x50a13c
xor ecx, ecx
jmp 0x50a061
mov ecx, dword [esp + 4]
mov ebx, dword [esp + 0x64]
mov eax, dword [esp + 0x10]
cmp edi, eax
mov esi, dword [esp + 0xc]
jb 0x50a07b
test eax, eax
je 0x50a1b1
cmp edi, eax
jbe 0x50a1b1
cmp byte [esi + eax], 0xbf
mov edi, eax
jg 0x50a07b
push 0x30
pop edx
mov ecx, str.assertion_failed:_self.is_char_boundary_new_len_
push 0x570840
call fcn.00506cd0
jmp 0x50a1ae
push 0x54644c
jmp 0x50a1a9
mov ecx, eax
mov edx, dword [esp + 4]
push 0x54645c
jmp 0x50a1a9
mov ecx, dword [esp + 0x18]
cmp ecx, edx
cmovbe ecx, edx
push 0x54642c
jmp 0x50a1a9
mov edx, dword [esp + 4]
push 0x54643c
call fcn.00506bf0
pop eax
ud2
mov edi, eax
jmp 0x50a07b
mov ecx, edi
mov edx, dword [esp + 8]
push 0x54647c
push eax
push 0
call fcn.005071d0
add esp, 0xc
ud2