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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x50ca10
sub esp, 0x70
mov dword [esp], 0
mov eax, dword [esp + 0x74]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 8], eax
call fcn.0044d550
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp], eax
mov dword [esp + 4], ecx
lea eax, [0x58040c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0xffffffff
call fcn.004dba10
mov eax, dword [esp + 0x18]
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x28], ecx
lea edx, [0x522b20]
mov dword [esp], edx
mov dword [esp + 4], 0
mov dword [esp + 8], 0
call fcn.00449820
mov eax, dword [esp + 0xc]
mov dword [esp + 0x6c], eax
xor ecx, ecx
xor edx, edx
xor ebx, ebx
xor ebp, ebp
xor esi, esi
lea edi, [esp + 0x24]
jmp 0x50c70c
cmp ecx, 3
sete bl
mov edx, dword [esp + 0x4c]
inc edx
or ebx, eax
mov eax, dword [esp + 0x6c]
mov eax, ecx
mov ecx, edx
mov edx, eax
mov eax, dword [esp + 0x6c]
mov byte [esp + 0x27], bl
mov ebx, dword [esp + 0x28]
cmp ecx, ebx
jge 0x50c844
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], esi
mov dword [esp + 0x58], edi
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x50]
lea edx, [eax + ecx*8]
mov ebx, dword [edx]
mov dword [esp + 0x54], ebx
mov edx, dword [edx + 4]
mov dword [esp + 0x30], edx
mov dword [esp], ebx
mov dword [esp + 4], edx
lea ebp, [0x53ed3a]
mov dword [esp + 8], ebp
mov dword [esp + 0xc], 1
call fcn.004dd7e0
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x50c773
mov ebx, dword [esp + 0x2c]
lea edx, [ebx + 1]
jmp 0x50c777
mov edx, dword [esp + 0x2c]
cmp edx, 4
je 0x50c834
movzx ebx, byte [esp + 0x27]
test bl, bl
je 0x50c81f
mov ebp, dword [esp + 0x34]
inc ebp
mov esi, dword [esp + 0x38]
cmp esi, ebp
jb 0x50c7a0
mov edi, dword [esp + 0x58]
jmp 0x50c7df
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x58]
mov dword [esp], eax
mov dword [esp + 4], ebp
mov dword [esp + 8], esi
mov dword [esp + 0xc], 1
lea eax, [0x522b20]
mov dword [esp + 0x10], eax
call fcn.004498e0
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
movzx ebx, byte [esp + 0x27]
mov eax, ebx
lea ebx, [edi + ebp*8 - 4]
mov ecx, edx
mov edx, dword [esp + 0x30]
mov dword [ebx], edx
lea edx, [edi + ebp*8 - 8]
mov ebx, dword [0x92b5b0]
test ebx, ebx
jne 0x50c806
mov ebx, dword [esp + 0x54]
mov dword [edx], ebx
jmp 0x50c6f1
mov ebx, edi
mov edi, edx
mov eax, dword [esp + 0x54]
call fcn.00461c70
movzx eax, byte [esp + 0x27]
mov edi, ebx
jmp 0x50c6f1
mov eax, ebx
mov ecx, edx
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x58]
jmp 0x50c6f1
mov eax, dword [esp + 0x6c]
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x58]
cmp ebp, 2
jb 0x50ca03
lea ecx, [esi - 2]
neg ecx
sar ecx, 0x1f
and ecx, 0x10
add ecx, edi
mov dword [esp + 0x68], ecx
lea edx, [ebp - 2]
mov dword [esp + 0x4c], edx
xor ebx, ebx
xor ebp, ebp
xor esi, esi
jmp 0x50c882
mov edi, dword [esp + 0x48]
inc edi
mov ecx, dword [esp + 0x68]
mov eax, ebp
mov esi, edx
mov edx, dword [esp + 0x4c]
mov ebp, ebx
mov ebx, edi
cmp ebx, edx
jge 0x50c9e0
mov dword [esp + 0x48], ebx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x5c], eax
mov dword [esp + 0x3c], esi
lea eax, [ecx + ebx*8]
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.004dbcb0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
cmp ecx, 3
jbe 0x50c9f9
mov ecx, dword [eax + 0x1c]
mov edx, dword [eax + 0x18]
mov ebx, dword [esp + 0x84]
cmp ebx, ecx
je 0x50c8de
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x5c]
jmp 0x50c86d
mov dword [esp + 0x60], eax
mov dword [esp], edx
mov eax, dword [esp + 0x80]
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.00402a50
movzx eax, byte [esp + 0xc]
test al, al
jne 0x50c913
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x5c]
jmp 0x50c86d
mov eax, dword [esp + 0x60]
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004c8fb0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
test eax, eax
jne 0x50c94a
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x5c]
jmp 0x50c86d
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.004c7270
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x3c]
inc edx
mov ebx, dword [esp + 0x40]
cmp ebx, edx
jb 0x50c975
mov ebp, dword [esp + 0x5c]
jmp 0x50c9bb
mov dword [esp + 0x44], ecx
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], 1
lea eax, [0x522b20]
mov dword [esp + 0x10], eax
call fcn.004498e0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x44]
mov ebx, ebp
mov ebp, eax
mov eax, dword [esp + 0x64]
lea esi, [ebp + edx*8 - 4]
mov dword [esi], ecx
lea edi, [ebp + edx*8 - 8]
mov ecx, dword [0x92b5b0]
test ecx, ecx
jne 0x50c9d6
mov dword [edi], eax
jmp 0x50c86d
call fcn.00461c70
jmp 0x50c86d
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], esi
mov dword [esp + 0x90], ebp
add esp, 0x70
ret
mov eax, 3
call fcn.00461cf0
mov eax, 2
mov ecx, ebp
call fcn.00461d50
nop
call fcn.00460860
jmp fcn.0050c640