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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x50d86f
sub esp, 0x64
mov eax, dword [0x7ef818]
test eax, eax
je 0x50d372
mov ecx, dword [esp + 0x68]
cmp ecx, eax
jle 0x50d372
mov edx, 1
jmp 0x50d396
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
add esp, 0x64
ret
shl eax, 1
inc edx
mov ecx, ebx
mov ebx, ecx
sar ecx, 1
cmp eax, ecx
jge 0x50d3a3
cmp edx, 0x40
jl 0x50d391
mov dword [esp + 0x44], edx
mov eax, dword [esp + 0x6c]
cmp eax, 0xa
jne 0x50d3d8
lea eax, [0x8267c0]
mov dword [esp], eax
call fcn.004676e0
mov ecx, dword [esp + 0x44]
cmp ecx, 0x40
ja 0x50d864
lea eax, [0x8267c8]
mov edx, 0x40
jmp 0x50d3f8
lea eax, [0x621c00]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], edx
call fcn.00447cc0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x44]
mov edx, ecx
lea ebx, [ecx - 1]
cmp ecx, ebx
jbe 0x50d85d
mov dword [esp + 0x34], edx
mov dword [esp + 0x58], eax
lea ebx, [ecx + ecx*4]
mov ebx, dword [eax + ebx*4 - 4]
test ebx, ebx
jne 0x50d41a
xor ebx, ebx
jmp 0x50d451
mov ebx, dword [esp + 0x6c]
cmp ebx, 0xa
jne 0x50d43d
lea eax, [0x8267c0]
mov dword [esp], eax
call fcn.00467a80
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
add esp, 0x64
ret
inc ebx
cmp ebx, ecx
jge 0x50d6ec
cmp ebx, ecx
jae 0x50d856
lea ebp, [ebx + ebx*4]
mov esi, dword [eax + ebp*4 + 0x10]
test esi, esi
jne 0x50d450
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebp
test ebx, ebx
jne 0x50d4e1
mov eax, dword [0x7ef818]
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov ecx, dword [esp + 0x74]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
call fcn.0050d250
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x58]
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
mov ecx, dword [0x84c5a0]
test ecx, ecx
jne 0x50d4ca
mov dword [edi], eax
jmp 0x50d4cf
call fcn.0045e940
mov eax, dword [0x7ef818]
mov ecx, dword [esp + 0x70]
imul eax, ecx
mov dword [edi + 0x10], eax
jmp 0x50d55a
mov ecx, dword [eax + ebp*4 - 0x14]
mov edx, dword [eax + ebp*4 - 0x10]
mov ebx, dword [eax + ebp*4 - 0xc]
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebx
call fcn.00508840
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x58]
mov dword [ebp + ebx*4 + 4], ecx
mov dword [ebp + ebx*4 + 8], edx
lea edi, [ebp + ebx*4]
mov ecx, dword [0x84c5a0]
test ecx, ecx
jne 0x50d545
mov dword [ebp + ebx*4], eax
jmp 0x50d54a
call fcn.0045e940
mov eax, dword [ebp + ebx*4 - 4]
shl eax, 1
mov dword [ebp + ebx*4 + 0x10], eax
mov ecx, dword [esp + 0x70]
mov edi, ebp
mov eax, dword [esp + 0x4c]
mov edx, dword [edi + eax*4 + 4]
mov ebx, dword [edi + eax*4]
lea ebp, [edi + eax*4]
mov dword [esp + 0x60], ebp
test edx, edx
jg 0x50d585
mov esi, edx
xor edx, edx
mov dword [esp + 0x5c], edx
xor edx, edx
mov dword [esp + 0x40], edx
mov edx, esi
jmp 0x50d62f
mov dword [esp + 0x38], edx
mov dword [esp + 0x54], ebx
cmp edx, 1
jne 0x50d5e4
lea eax, [0x60c2c0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447cc0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x70]
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x60]
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x58]
mov edx, 1
mov dword [esp + 0x5c], eax
mov ecx, 1
mov dword [esp + 0x40], ecx
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x70]
jmp 0x50d62f
lea eax, [0x60c2c0]
mov dword [esp], eax
mov dword [esp + 4], edx
lea ecx, [edx + 4]
mov dword [esp + 0x28], ecx
mov dword [esp + 8], ecx
call fcn.00447cc0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x70]
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x60]
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x58]
mov edx, esi
mov dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x40], ecx
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x70]
cmp edx, esi
jg 0x50d635
mov esi, edx
mov dword [esp + 0x3c], edx
mov ecx, dword [esp + 0x5c]
cmp ecx, ebx
je 0x50d700
mov dword [esp], ecx
mov dword [esp + 4], ebx
shl esi, 2
mov dword [esp + 8], esi
call fcn.0045f2b0
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x60]
mov edi, dword [esp + 0x58]
jmp 0x50d700
mov edx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x58]
mov ebp, dword [ebx + edx*4 + 4]
mov esi, dword [ebx + edx*4]
lea edi, [ebp - 1]
test edi, edi
jl 0x50d6cd
mov ebp, dword [esi + ebp*4 - 4]
nop
cmp ebp, 0x10000
jb 0x50d69e
shr ebp, 0x10
mov eax, 0x10
jmp 0x50d6a0
xor eax, eax
cmp ebp, 0x100
jb 0x50d6ae
shr ebp, 8
add eax, 8
cmp ebp, 0x100
jae 0x50d84a
shl edi, 5
lea esi, [0x656afc]
movzx ebp, byte [esi + ebp]
add ebp, eax
add ebp, edi
jmp 0x50d6d5
lea esi, [0x656afc]
xor ebp, ebp
mov dword [ebx + edx*4 + 0xc], ebp
mov eax, ebx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x48]
jmp 0x50d450
mov ebx, dword [esp + 0x6c]
cmp ebx, 0xa
jmp 0x50d421
inc dword [edx + ecx*4 + 0x10]
mov ecx, ebx
mov edx, ebp
mov dword [esp], ecx
mov dword [esp + 4], edx
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0x6c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], 0
call fcn.00510030
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x50d671
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x58]
mov ebx, dword [edx + ecx*4 + 8]
mov ebp, dword [edx + ecx*4]
mov esi, dword [esp + 0x3c]
cmp esi, ebx
jg 0x50d757
mov eax, esi
jmp 0x50d7c9
cmp esi, 1
jne 0x50d796
lea eax, [0x60c2c0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447cc0
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x58]
mov esi, 1
mov ebx, 1
jmp 0x50d7c9
lea eax, [0x60c2c0]
mov dword [esp], eax
mov dword [esp + 4], esi
lea ecx, [esi + 4]
mov dword [esp + 0x24], ecx
mov dword [esp + 8], ecx
call fcn.00447cc0
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x58]
mov esi, eax
mov ebx, dword [esp + 0x24]
cmp esi, eax
jle 0x50d7d1
mov edi, eax
jmp 0x50d7d5
mov edi, eax
mov eax, esi
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x5c]
cmp ebp, ebx
je 0x50d814
mov dword [esp + 0x50], ebp
mov dword [esp + 0x2c], esi
mov dword [esp], ebp
mov dword [esp + 4], ebx
shl eax, 2
mov dword [esp + 8], eax
call fcn.0045f2b0
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x58]
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x50]
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x3c]
mov dword [edx + ecx*4 + 4], esi
mov esi, dword [esp + 0x30]
mov dword [edx + ecx*4 + 8], esi
mov esi, dword [0x84c5a0]
test esi, esi
jne 0x50d838
mov dword [edx + ecx*4], ebp
mov ebp, edi
mov edi, dword [esp + 0x60]
jmp 0x50d6f8
mov eax, ebp
mov ebp, edi
mov edi, dword [esp + 0x60]
call fcn.0045e940
jmp 0x50d6f8
mov eax, ebp
mov ecx, 0x100
call fcn.0045e9d0
mov eax, ebx
call fcn.0045e9c0
mov eax, ebx
call fcn.0045e9c0
mov edx, 0x40
call fcn.0045e9e0
nop
call fcn.0045d530
jmp fcn.0050d340