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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x38c
mov edi, dword [ecx + 0x18]
mov eax, dword [0x5ec348]
mov dword [esp + 0x37c], eax
xor eax, eax
mov dword [esp + 0x10], ecx
cmp edi, 3
ja 0x50b5e0
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 4]
test eax, eax
jne 0x50b3d8
or dword [esi + 0x18], 3
mov eax, dword [esp + 0x37c]
sub eax, dword [0x5ec348]
jne 0x50b892
add esp, 0x38c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x50], eax
lea edi, [esp + 0x7c]
xor eax, eax
mov ecx, 0xc0
rep stosd dword es:[edi], eax
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x50]
lea ecx, [esp + 0x64]
mov dword [esp + 0x58], 0
mov edx, dword [esi]
mov dword [esp], eax
lea ebp, [esi + 0x18]
mov dword [esp + 0x5c], 0
mov dword [esp + 0x54], edx
mov byte [esp + 0x60], 0
call fcn.0050c6b0
sub esp, 4
cmp byte [esp + 0x6c], 0
je 0x50b634
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x68]
cmp byte [esp + 0x78], 0
mov dword [esp + 0x7c], eax
movzx eax, byte [esp + 0x6c]
mov dword [esp + 0x80], edx
mov byte [esp + 0x84], al
je 0x50b7ee
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
lea ecx, [esp + 0x38]
mov dword [esp + 0x88], eax
movzx eax, byte [esp + 0x78]
mov dword [esp + 0x8c], edx
mov byte [esp + 0x90], al
lea eax, [esp + 0x50]
mov dword [esp], eax
call fcn.0050c500
sub esp, 4
movzx eax, byte [esp + 0x40]
test al, al
je 0x50b865
lea ebx, [esp + 0x94]
mov esi, ebp
nop
mov edi, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
mov byte [ebx + 8], al
lea eax, [esp + 0x50]
lea ecx, [esp + 0x44]
add ebx, 0xc
mov dword [ebx - 0xc], edi
mov dword [ebx - 8], ebp
mov dword [esp], eax
call fcn.0050c500
sub esp, 4
movzx eax, byte [esp + 0x4c]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ecx
mov byte [esp + 0x40], al
test al, al
je 0x50b660
lea edi, [esp + 0x37c]
cmp ebx, edi
jne 0x50b4a0
mov edi, dword [esp + 0x10]
mov ecx, 0x40
mov edx, dword [edi + 0x18]
mov dword [esp + 0x14], edx
and edx, 0xfffffffc
mov dword [edi + 0x18], edx
cmp edx, 3
jbe 0x50b513
mov ecx, dword [edx]
add ecx, 0x40
mov dword [esp], ecx
mov ecx, esi
mov dword [esp + 4], 0
mov byte [esp + 0x20], al
call fcn.0050be70
sub esp, 8
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], esi
lea ebp, [esp + 0x7c]
mov ecx, dword [eax + 0x18]
mov eax, dword [esp + 0x5c]
add eax, eax
mov edx, dword [ecx]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x54]
shl edx, 5
mov dword [esp + 0x18], eax
lea ebx, [ecx + edx + 8]
lea esi, cs:[esi]
nop
mov edi, dword [esp + 0x14]
mov eax, dword [ebp + 4]
lea ecx, [ebx + 8]
mov edx, dword [esp + 0x18]
mov dword [ebx], ecx
lea esi, [eax + edi]
movzx edi, byte [ebp + 8]
sub esi, edx
mov edx, dword [ebp]
sar esi, 1
test eax, eax
jne 0x50b58a
test edx, edx
jne 0x50b877
lea edx, [eax + edx*2]
mov dword [esp], eax
mov ecx, ebx
add ebp, 0xc
mov dword [esp + 4], edx
add ebx, 0x20
call fcn.0053dc40
mov eax, edi
mov dword [ebx - 4], esi
sub esp, 8
movzx edi, al
mov eax, dword [esp + 0x10]
mov dword [ebx - 8], edi
mov eax, dword [eax + 0x18]
add dword [eax], 1
lea eax, [esp + 0x37c]
cmp ebp, eax
jne 0x50b560
movzx eax, byte [esp + 0x20]
mov esi, dword [esp + 0x1c]
lea ebx, [esp + 0x7c]
test al, al
jne 0x50b4a0
jmp 0x50b3b7
and edi, 0xfffffffc
mov esi, dword [edi]
lea ebx, [edi + 8]
test esi, esi
jle 0x50b629
lea esi, [esi]
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x50b605
mov dword [esp], eax
lea ecx, [ebx + 0x18]
call fcn.004ae580
sub esp, 4
mov eax, dword [ebx]
lea edx, [ebx + 8]
cmp eax, edx
je 0x50b621
mov edx, dword [ebx + 8]
mov dword [esp], eax
lea edx, [edx + edx + 2]
mov dword [esp + 4], edx
call fcn.0054fb40
add ebx, 0x20
sub esi, 1
jne 0x50b5f0
mov dword [edi], 0
jmp 0x50b3a8
lea eax, [esp + 0x50]
lea ecx, [esp + 0x38]
mov dword [esp], eax
call fcn.0050c500
sub esp, 4
movzx eax, byte [esp + 0x40]
lea ebx, [esp + 0x7c]
test al, al
jne 0x50b49c
jmp 0x50b3b7
lea ecx, [esp + 0x37c]
cmp ebx, ecx
je 0x50b4f3
lea eax, [esp + 0x7c]
mov ebp, esi
cmp ebx, eax
je 0x50b3b7
sub ebx, eax
cmp ebx, 0xc
je 0x50b815
mov eax, ebx
sar eax, 2
imul eax, eax, 0xaaaaaaab
mov dword [esp + 0x20], eax
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0x18]
mov dword [esp + 0x14], eax
and eax, 0xfffffffc
mov dword [esi + 0x18], eax
cmp eax, 3
ja 0x50b842
mov eax, dword [esp + 0x20]
mov dword [esp], eax
mov ecx, ebp
mov dword [esp + 4], 1
call fcn.0050be70
sub esp, 8
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x18]
mov eax, dword [edx]
shl eax, 5
lea eax, [edx + eax + 8]
test ebx, ebx
jle 0x50b3b7
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x14], 0
mov ebp, eax
lea edi, [esp + 0x7c]
add esi, esi
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x54]
mov dword [esp + 0x28], esi
jmp 0x50b75a
cmp edx, 1
jne 0x50b7cb
movzx edx, word [esi]
mov word [ebp + 8], dx
mov edx, 2
mov dword [ebp + 4], ecx
xor ecx, ecx
mov esi, dword [esp + 0x20]
add ebp, 0x20
mov word [eax + edx], cx
movzx eax, byte [esp + 0x18]
add edi, 0xc
add dword [esp + 0x14], 1
mov dword [ebp - 8], eax
mov eax, dword [esp + 0x1c]
mov dword [ebp - 4], eax
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x18]
add dword [eax], 1
mov eax, dword [esp + 0x14]
cmp eax, esi
jge 0x50b3b7
mov esi, dword [edi + 4]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov ebx, dword [edi]
add eax, esi
sub eax, edx
sar eax, 1
mov dword [esp + 0x1c], eax
movzx eax, byte [edi + 8]
mov byte [esp + 0x18], al
lea eax, [ebp + 8]
mov dword [ebp], eax
test esi, esi
jne 0x50b78b
test ebx, ebx
jne 0x50b877
add ebx, ebx
mov edx, ebx
sar edx, 1
mov dword [esp + 0x44], edx
mov ecx, edx
cmp ebx, 0xe
jbe 0x50b708
lea eax, [esp + 0x44]
mov dword [esp + 4], 0
mov ecx, ebp
mov dword [esp], eax
mov dword [esp + 0x2c], edx
call fcn.005401b0
sub esp, 8
mov dword [ebp], eax
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x2c]
mov dword [ebp + 8], ecx
test edx, edx
je 0x50b7df
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov ecx, dword [esp + 0x44]
mov eax, dword [ebp]
lea edx, [ecx + ecx]
jmp 0x50b71d
lea eax, [esp + 0x50]
lea ecx, [esp + 0x38]
mov dword [esp], eax
call fcn.0050c500
sub esp, 4
movzx eax, byte [esp + 0x40]
lea ebx, [esp + 0x88]
test al, al
jne 0x50b49c
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x18]
mov edx, eax
and edx, 0xfffffffc
cmp eax, 3
jbe 0x50b84f
mov eax, dword [edx]
test eax, eax
je 0x50b84f
mov esi, dword [esp + 0x10]
mov dword [esp + 0x20], 1
mov ebx, 0xc
mov dword [esi + 0x18], edx
jmp 0x50b844
mov eax, dword [eax]
mov esi, dword [esp + 0x20]
add eax, esi
jmp 0x50b6b5
movzx eax, byte [esp + 0x84]
mov esi, dword [esp + 0x10]
or eax, edx
mov dword [esi + 0x18], eax
jmp 0x50b3b7
mov dword [esp + 0x20], 2
mov ebx, 0x18
jmp 0x50b697
mov eax, dword [esp + 0x37c]
sub eax, dword [0x5ec348]
jne 0x50b892
mov dword [esp], 0x5944f8
call fcn.00552460
call fcn.00497000
nop
nop
nop
nop
nop
nop
nop
nop
nop
push ebp
mov ecx, 0x5600f4
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x5c], eax
mov eax, dword [0x5ec348]
mov dword [ebp - 0x1c], eax
xor eax, eax
call fcn.004b6010
mov edx, eax
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov eax, dword [eax + edx*4]
test eax, eax
je 0x50ba0d
xor edx, edx
lea esi, [ebp - 0x48]
mov dword [ebp - 0x4c], 0
mov word [ebp - 0x48], dx
lea edx, [ebp - 0x50]
mov dword [ebp - 0x50], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x5c]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.0054a7f0
test al, al
je 0x50ba22
mov eax, dword [ebp - 0x50]
mov edi, dword [ebp - 0x4c]
cmp eax, esi
je 0x50b970
movd xmm0, dword [ebp - 0x48]
movd xmm1, edi
xor edx, edx
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x38], eax
punpckldq xmm1, xmm0
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], 0
mov word [ebp - 0x48], dx
mov dword [ebp - 0x5c], ecx
movq qword [ebp - 0x34], xmm1
cmp eax, ecx
je 0x50b9b8
mov dword [ebx], eax
movd dword [ebx + 8], xmm0
mov dword [ebx + 4], edi
mov eax, dword [ebp - 0x1c]
sub eax, dword [0x5ec348]
jne 0x50ba1d
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [edi + edi + 2]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x5c], eax
mov dword [esp + 8], edx
mov dword [ebp - 0x60], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
lea ecx, [ebx + 8]
mov edx, dword [ebp - 0x60]
mov dword [ebx], ecx
cmp edx, 4
jae 0x50b9c8
test edx, edx
je 0x50b953
movzx eax, byte [ebp - 0x30]
mov byte [ecx], al
test dl, 2
je 0x50b953
movzx eax, word [ebp + edx - 0x32]
mov word [ecx + edx - 2], ax
jmp 0x50b953
lea ecx, [ebx + 8]
lea edx, [edi + edi + 2]
mov dword [ebx], ecx
jmp 0x50b995
mov eax, dword [ebp - 0x30]
mov dword [ecx], eax
mov eax, dword [ebp + edx - 0x34]
mov dword [ecx + edx - 4], eax
lea eax, [ecx + 4]
mov esi, dword [ebp - 0x5c]
and eax, 0xfffffffc
sub ecx, eax
add edx, ecx
sub esi, ecx
and edx, 0xfffffffc
mov dword [ebp - 0x5c], esi
cmp edx, 4
jb 0x50b953
and edx, 0xfffffffc
xor ecx, ecx
mov esi, dword [ebp - 0x5c]
mov esi, dword [esi + ecx]
mov dword [eax + ecx], esi
add ecx, 4
cmp ecx, edx
jb 0x50b9f8
jmp 0x50b953
mov eax, dword [ebp - 0x1c]
sub eax, dword [0x5ec348]
jne 0x50ba1d
call fcn.00552400
call fcn.00497000
jmp 0x554adc
mov dword [esp], 0x18
lea edi, [ebp - 0x38]
call fcn.0054fc30
mov esi, eax
call fcn.00534560
mov dword [esp], str.Cannot_convert_character_sequence
mov ecx, edi
mov ebx, eax
call fcn.005542b8
push ecx
mov ecx, esi
mov dword [esp + 4], 0x2a
mov dword [esp + 8], ebx
mov dword [esp], edi
call fcn.00508c90
sub esp, 0xc
mov ecx, edi
call fcn.00539180
mov eax, dword [ebp - 0x1c]
sub eax, dword [0x5ec348]
jne 0x554b6e
mov dword [esp + 8], 0x508eb0
mov dword [esp + 4], 0x598450
mov dword [esp], esi
call fcn.005501c0
mov ebx, eax
jmp 0x554b5b
mov dword [esp], esi
call fcn.0054feb0
lea ecx, [ebp - 0x50]
call fcn.0053d5a0
mov eax, dword [ebp - 0x1c]
sub eax, dword [0x5ec348]
je 0x554b77
call fcn.00497000
mov ebx, eax
jmp 0x554b53
mov dword [esp], ebx
call fcn.00494760
nop