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

Disassembly:
mov eax, 0xc3c
call fcn.005ae090
mov eax, dword [0x665ec0]
xor eax, esp
mov dword [esp + 0xc38], eax
push ebp
push esi
mov esi, dword [esp + 0xc48]
xor ebp, ebp
mov dword [esp + 0x20], esi
mov dword [esp + 8], ebp
cmp dword [esi + 0x48], ebp
jbe 0x50fbd4
push ebx
push edi
xor ebx, ebx
mov dword [esp + 0x1c], ebx
nop dword [eax]
cmp dword [esi + 0x30], 0
mov dword [esp + 0x14], 0
jbe 0x50fbb6
movzx eax, bl
mov dword [esp + 0x20], eax
nop dword [eax]
push 0x400
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.005afaf0
mov edi, dword [esi + 0x40]
add esp, 0xc
mov eax, edi
sub eax, 0
je 0x50f918
sub eax, 1
je 0x50f8b0
sub eax, 1
jne 0x50f918
test ebp, ebp
jne 0x50f8aa
cmp bl, 2
jae 0x50f8aa
lea eax, [ebp + 1]
jmp 0x50f8ac
xor eax, eax
test eax, eax
je 0x50f918
push 0x400
lea eax, [esp + 0x44c]
push 0
push eax
call fcn.005afaf0
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x50], eax
movzx eax, bl
cdq
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0x4c]
mov dword [esp + 0x60], eax
mov eax, dword [esi + 0x48]
mov dword [esp + 0x68], eax
mov eax, edi
mov dword [esp + 0x5c], edx
cdq
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], edx
xor ebp, ebp
cmp dword [esp + 0x10], ebp
jne 0x50f955
test bl, bl
jne 0x50f955
mov ebp, 2
sub edi, 0
je 0x50f955
sub edi, 1
je 0x50f938
sub edi, 1
jne 0x50f955
lea eax, [esp + 0x448]
push eax
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x850]
push eax
call fcn.00510520
add esp, 0xc
mov ecx, dword [esi + 0x54]
mov eax, ecx
imul eax, dword [esp + 0x14]
mov edi, dword [esi + 0x50]
mov edx, edi
imul edx, dword [esp + 0x20]
add eax, ebp
add edx, eax
mov dword [esp + 0x24], edx
lea eax, [edx - 1]
mov dword [esp + 0x18], eax
mov eax, edx
xor edx, edx
div ecx
test edx, edx
jne 0x50f98b
mov eax, dword [esp + 0x24]
dec ecx
add ecx, eax
jmp 0x50f999
mov eax, dword [esp + 0x18]
mov ecx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
cmp ebp, edi
jae 0x50fba0
movzx edx, bl
mov ebx, edi
mov dword [esp + 0x20], edx
mov edx, eax
shl edx, 0xa
mov dword [esp + 0x3c], edx
mov edi, dword [esi + 0x54]
xor edx, edx
div edi
push dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
cmp edx, 1
push dword [esp + 0x14]
cmovne eax, ecx
push esi
mov dword [esp + 0x38], eax
call fcn.0050e260
add esp, 0xc
test eax, eax
je 0x50fa43
mov esi, ebp
and esi, 0x7f
jne 0x50fa2f
add dword [esp + 0x78], 1
lea eax, [esp + 0x848]
push esi
adc dword [esp + 0x80], esi
push eax
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x454]
push eax
call fcn.0050e290
push esi
lea eax, [esp + 0x85c]
push eax
push eax
lea eax, [esp + 0x464]
push eax
call fcn.0050e290
mov ebx, dword [esp + 0x48]
add esp, 0x20
mov edi, dword [ebx + 0x54]
mov ebx, dword [ebx + 0x50]
mov edx, dword [esp + esi*8 + 0x848]
mov eax, dword [esp + esi*8 + 0x84c]
mov esi, dword [esp + 0x28]
jmp 0x50fa54
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi + 0x44]
shl ecx, 0xa
mov edx, dword [ecx + eax]
mov eax, dword [ecx + eax + 4]
push 0
push dword [esi + 0x30]
mov dword [esp + 0x48], edx
push 0
push eax
call fcn.005ae720
mov esi, dword [esp + 0x10]
mov ecx, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x38], eax
test esi, esi
jne 0x50fa8c
test dl, dl
jne 0x50fa8c
mov eax, dword [esp + 0x14]
lea ecx, [esi + 1]
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], esi
jmp 0x50fa9f
cmp eax, dword [esp + 0x14]
jne 0x50fa9d
test ecx, ecx
jne 0x50fa9d
mov ecx, 1
jmp 0x50fa9f
xor ecx, ecx
mov dword [esp + 0x30], 0
test esi, esi
je 0x50fadd
test ecx, ecx
je 0x50fab8
mov esi, edi
sub esi, ebx
dec esi
add esi, ebp
jmp 0x50fac7
mov esi, ebx
mov eax, ebx
neg esi
not eax
test ebp, ebp
cmove esi, eax
add esi, edi
cmp dl, 3
je 0x50fb01
movzx eax, dl
mov dword [esp + 0x20], eax
inc eax
imul eax, ebx
mov dword [esp + 0x30], eax
jmp 0x50fb01
test dl, dl
jne 0x50fae6
lea esi, [ebp - 1]
jmp 0x50fb01
mov eax, dword [esp + 0x20]
imul eax, ebx
test ecx, ecx
je 0x50faf6
lea esi, [ebp - 1]
jmp 0x50faff
mov esi, ebp
neg esi
sbb esi, esi
neg esi
dec esi
add esi, eax
mov eax, dword [esp + 0x40]
push 0
push eax
push 0
push eax
call fcn.005ae8c0
mov eax, edx
mul esi
xor eax, eax
dec esi
sub esi, edx
push 0
sbb eax, eax
add esi, dword [esp + 0x34]
push edi
adc eax, 0
push eax
push esi
call fcn.005ae720
mov esi, dword [esp + 0x28]
mov ecx, eax
mov eax, dword [esp + 0x2c]
shl eax, 0xa
mov dword [esp + 0x30], eax
xor eax, eax
cmp dword [esi + 0x38], 0x10
mov edx, dword [esi + 0x44]
je 0x50fb4f
cmp dword [esp + 0x10], eax
setne al
imul edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
push eax
add edi, ecx
lea eax, [edx + ebx]
push eax
mov eax, dword [esp + 0x38]
shl edi, 0xa
add eax, edx
add edi, edx
push edi
push eax
call fcn.0050e290
mov eax, dword [esp + 0x34]
add ebx, 0x400
mov ecx, dword [esp + 0x3c]
inc ebp
inc dword [esp + 0x28]
inc eax
mov dword [esp + 0x4c], ebx
add esp, 0x10
mov ebx, dword [esi + 0x50]
inc ecx
mov dword [esp + 0x24], eax
cmp ebp, ebx
jb 0x50f9b3
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esi + 0x30]
jb 0x50f870
inc ebx
mov dword [esp + 0x1c], ebx
cmp ebx, 4
jb 0x50f850
inc ebp
mov dword [esp + 0x10], ebp
cmp ebp, dword [esi + 0x48]
jb 0x50f846
pop edi
pop ebx
mov ecx, dword [esp + 0xc40]
mov eax, 1
pop esi
pop ebp
xor ecx, esp
call fcn.005ae073
add esp, 0xc3c
ret