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

Disassembly:
sub esp, 0x80
push ebx
mov ebx, dword [esp + 0x94]
xor eax, eax
cmp dword [esp + 0x98], 0x5d4
push ebp
push esi
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], eax
jb 0x50bcbf
push dword [esp + 0xa8]
lea eax, [ebx + 0x68]
push 0x36c
push eax
push dword [esp + 0xa8]
lea eax, [esp + 0x2c]
push dword [esp + 0xa8]
lea edi, [ebx + 0x4d4]
push eax
lea eax, [esp + 0x44]
push eax
push ebx
push 0x100
push edi
call fcn.00508598
add esp, 0x28
mov dword [esp + 0x54], eax
cmp eax, 0xffffff88
ja 0x50bcc2
mov ebp, dword [esp + 0x94]
push ebp
call fcn.00504f4e
push 0xb
movzx esi, al
mov dword [esp + 0x1c], eax
inc esi
pop eax
cmp esi, eax
cmovb eax, esi
push eax
push dword [esp + 0x24]
push dword [esp + 0x38]
push ebx
push edi
call fcn.0050bf0f
add esp, 0x18
mov dword [esp + 0x1c], eax
cmp eax, esi
ja 0x50bcbf
mov byte [esp + 0x16], al
xor ecx, ecx
push 4
lea eax, [esp + 0x18]
mov byte [esp + 0x19], cl
push eax
push ebp
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x28]
xor ecx, ecx
mov esi, dword [esp + 0x38]
add esp, 0xc
inc eax
mov ebp, ecx
mov edx, ecx
test eax, eax
jle 0x50b8c1
mov edi, eax
mov eax, ebp
add ebp, dword [ebx + edx*4]
mov dword [ebx + edx*4 + 0x34], eax
inc edx
cmp edx, edi
jl 0x50b8ad
lea edi, [ebx + 0x4d4]
lea ebp, [esi - 3]
mov edx, ecx
mov dword [esp + 0x10], edx
test ebp, ebp
jle 0x50b914
mov eax, ecx
lea esi, [edi + edx]
mov dword [esp + 0x24], eax
movzx edx, byte [esi]
mov cl, al
add cl, byte [esp + 0x10]
mov eax, dword [ebx + edx*4 + 0x34]
mov byte [eax + ebx + 0x3d4], cl
inc dword [ebx + edx*4 + 0x34]
mov eax, dword [esp + 0x24]
inc eax
inc esi
mov dword [esp + 0x24], eax
cmp eax, 4
jl 0x50b8d7
mov edx, dword [esp + 0x10]
add edx, 4
mov dword [esp + 0x10], edx
push 0
pop ecx
cmp edx, ebp
jl 0x50b8ce
mov esi, dword [esp + 0x2c]
cmp edx, esi
jge 0x50b93a
lea esi, [ebx + 0x4d4]
add esi, edx
movzx ecx, byte [esi]
mov eax, dword [ebx + ecx*4 + 0x34]
mov byte [eax + ebx + 0x3d4], dl
inc dword [ebx + ecx*4 + 0x34]
inc edx
inc esi
cmp edx, dword [esp + 0x2c]
jl 0x50b920
mov eax, dword [esp + 0x1c]
xor ecx, ecx
mov edi, dword [ebx]
inc ecx
inc eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x24], ecx
cmp eax, ecx
jbe 0x50bcb9
mov ebp, dword [ebx + ecx*4]
xor esi, esi
inc esi
mov dword [esp + 0x48], ebp
shl esi, cl
mov cl, byte [esp + 0x1c]
sub cl, byte [esp + 0x24]
sar esi, 1
inc cl
mov eax, esi
mov dword [esp + 0x4c], esi
sub eax, 1
je 0x50bc55
sub eax, 1
je 0x50bc15
dec eax
sub eax, 1
je 0x50bb84
sub eax, 4
je 0x50bacb
test ebp, ebp
jle 0x50bc96
movzx eax, cl
mov ecx, dword [esp + 0x18]
cdq
add ecx, 0xa
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x30], edx
lea ecx, [eax + ecx*2]
mov dword [esp + 0x40], ecx
lea ecx, [ebx + 0x3d4]
mov ebx, dword [esp + 0x40]
add ecx, edi
mov edi, ebp
mov dword [esp + 0x44], ecx
mov dword [esp + 0x20], edi
mov ebp, ecx
movzx eax, byte [ebp]
mov ecx, 0x10001
cdq
shld edx, eax, 8
push ecx
shl eax, 8
add eax, dword [esp + 0x54]
push ecx
adc edx, dword [esp + 0x38]
push edx
push eax
call fcn.005256e0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
test esi, esi
jle 0x50baa5
lea edi, [esi - 1]
mov dword [esp + 0x34], ebx
shr edi, 4
mov esi, ebx
inc edi
mov ebp, eax
mov ebx, edx
push 8
lea eax, [esp + 0x5c]
mov dword [esp + 0x5c], ebp
push eax
lea eax, [esi - 0x10]
mov dword [esp + 0x64], ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
push 8
lea eax, [esp + 0x70]
mov dword [esp + 0x70], ebp
push eax
lea eax, [esi - 8]
mov dword [esp + 0x78], ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
push 8
lea eax, [esp + 0x84]
mov dword [esp + 0x84], ebp
push eax
push esi
mov dword [esp + 0x90], ebx
call sub.VCRUNTIME140.dll_memcpy
push 8
lea eax, [esp + 0x98]
mov dword [esp + 0x98], ebp
push eax
lea eax, [esi + 8]
mov dword [esp + 0xa0], ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0x30
add esi, 0x20
sub edi, 1
jne 0x50ba1b
mov esi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x20]
inc ebp
lea ebx, [ebx + esi*2]
sub edi, 1
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x20], edi
jne 0x50b9d8
mov ebp, dword [esp + 0x48]
mov edi, dword [esp + 0x10]
jmp 0x50bc8f
test ebp, ebp
jle 0x50bc96
movzx eax, cl
mov ecx, dword [esp + 0x18]
cdq
add ecx, 2
mov esi, eax
mov dword [esp + 0x20], ebp
mov eax, dword [esp + 0x94]
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edx
lea ecx, [eax + ecx*2]
mov dword [esp + 0x3c], ecx
lea ecx, [ebx + 0x3d4]
mov ebx, dword [esp + 0x3c]
add ecx, edi
mov dword [esp + 0x38], ecx
mov ebp, ecx
movzx eax, byte [ebp]
mov ecx, 0x10001
cdq
shld edx, eax, 8
push ecx
shl eax, 8
add eax, esi
push ecx
adc edx, dword [esp + 0x3c]
push edx
push eax
call fcn.005256e0
mov esi, eax
mov edi, edx
push 8
lea eax, [esp + 0x7c]
mov dword [esp + 0x7c], esi
push eax
push ebx
mov dword [esp + 0x88], edi
call sub.VCRUNTIME140.dll_memcpy
push 8
lea eax, [esp + 0x90]
mov dword [esp + 0x90], esi
push eax
lea eax, [ebx + 8]
mov dword [esp + 0x98], edi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [esp + 0x48]
add esp, 0x18
add ebx, 0x10
inc ebp
sub dword [esp + 0x20], 1
jne 0x50bb0c
mov esi, dword [esp + 0x4c]
jmp 0x50babe
test ebp, ebp
jle 0x50bc96
movzx eax, cl
mov ecx, dword [esp + 0x18]
cdq
add ecx, 2
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x94]
mov esi, dword [esp + 0x30]
mov dword [esp + 0x50], edx
mov dword [esp + 0x34], ebp
lea ecx, [eax + ecx*2]
mov dword [esp + 0x3c], ecx
lea ecx, [ebx + 0x3d4]
mov ebx, dword [esp + 0x3c]
add ecx, edi
mov dword [esp + 0x38], ecx
mov edi, ecx
movzx eax, byte [edi]
mov ecx, 0x10001
cdq
shld edx, eax, 8
push ecx
shl eax, 8
add eax, esi
push ecx
adc edx, dword [esp + 0x58]
push edx
push eax
call fcn.005256e0
mov dword [esp + 0x88], eax
lea eax, [esp + 0x88]
push 8
push eax
push ebx
mov dword [esp + 0x98], edx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add ebx, 8
inc edi
sub ebp, 1
jne 0x50bbc7
jmp 0x50bb7b
test ebp, ebp
jle 0x50bc96
mov eax, dword [esp + 0x94]
lea edx, [ebx + 0x3d4]
mov byte [esp + 0x28], cl
mov ebx, ebp
mov ecx, dword [esp + 0x18]
add ecx, 2
add edx, edi
lea ecx, [eax + ecx*2]
mov al, byte [edx]
inc edx
mov byte [esp + 0x29], al
mov ax, word [esp + 0x28]
mov word [ecx], ax
lea ecx, [ecx + 4]
mov word [ecx - 2], ax
sub ebx, 1
jne 0x50bc38
jmp 0x50bc8f
test ebp, ebp
jle 0x50bc96
mov eax, dword [esp + 0x94]
lea edx, [ebx + 0x3d4]
mov byte [esp + 0x14], cl
mov ebx, ebp
mov ecx, dword [esp + 0x18]
add ecx, 2
add edx, edi
lea ecx, [eax + ecx*2]
mov al, byte [edx]
inc edx
mov byte [esp + 0x15], al
mov ax, word [esp + 0x14]
mov word [ecx], ax
lea ecx, [ecx + 2]
sub ebx, 1
jne 0x50bc78
mov ebx, dword [esp + 0xa0]
mov ecx, dword [esp + 0x24]
add edi, ebp
mov eax, dword [esp + 0x1c]
imul esi, ebp
mov dword [esp + 0x10], edi
add dword [esp + 0x18], esi
inc ecx
inc eax
mov dword [esp + 0x24], ecx
cmp ecx, eax
jb 0x50b954
mov eax, dword [esp + 0x54]
jmp 0x50bcc2
push 0xffffffffffffffd4
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret