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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x144
mov eax, dword [0x57a040]
xor eax, esp
mov dword [esp + 0x140], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 0x20], ecx
push ebx
mov ebx, dword [ecx*4 + 0x20a514c]
mov dword [esp + 0x20], ebx
push esi
push edi
test eax, eax
js 0x50fbfa
cmp eax, 0x1194
jge 0x50fbfa
mov eax, dword [eax*4 + 0x20a514c]
mov edx, dword [ebp + 0x10]
movsx ecx, word [eax + 0x146]
movsx eax, word [eax + 0x144]
movzx edx, word [edx + 8]
push ecx
push eax
mov dword [esp + 0x2c], eax
movsx eax, word [ebx + 0x146]
push eax
movsx eax, word [ebx + 0x144]
mov dword [esp + 0x28], edx
movzx edx, dx
push eax
push edx
mov dword [esp + 0x34], ecx
call fcn.00507fe0
test al, al
je 0x50fbfa
mov ecx, dword [esp + 0x14]
mov esi, dword [ebx + 0x368]
add esi, 3
mov dword [esp + 0x10], 1
mov dword [esp + 0x3c], ecx
xor eax, eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x18], 0
nop
cmp byte [esi - 3], 0
je 0x50fa88
movsx edi, word [esi - 2]
cmp ecx, edi
je 0x50fa88
movzx eax, byte [esi]
push eax
push ecx
push edi
push ebx
call fcn.005082f0
test al, al
je 0x50fa80
mov ecx, dword [edi*4 + 0x20a514c]
movsx eax, word [ecx + 0x146]
push eax
movsx eax, word [ecx + 0x144]
mov ecx, dword [esp + 0x20]
push eax
push dword [esp + 0x28]
movzx eax, cx
push dword [esp + 0x30]
push eax
call fcn.005080e0
test al, al
je 0x50fa80
mov ecx, dword [esp + 0x10]
mov dword [esp + ecx*4 + 0x3c], edi
inc ecx
mov dword [esp + 0x10], ecx
cmp ecx, 3
jae 0x50fa95
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
inc eax
add esi, 4
mov dword [esp + 0x18], eax
cmp eax, 0x4b
jl 0x50fa20
mov eax, dword [esp + 0x1c]
mov ebx, 0xa
mov edi, dword [esp + 0x28]
mov esi, 0xc8
shr eax, 8
xor ecx, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], ecx
lea eax, [ecx + 1]
mov edx, 0x34
push eax
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x10]
movzx eax, word [eax + 8]
push eax
push esi
push dword [esp + ecx*4 + 0x48]
mov ecx, edi
call fcn.00523c10
mov eax, dword [esp + 0x20]
add esp, 0x10
cmp byte [ebp + 0x14], 0
mov ecx, dword [esp + eax*4 + 0x3c]
movzx eax, cx
mov dword [esp + 0x28], eax
je 0x50fb4b
mov eax, dword [edi]
mov dl, 9
shr eax, 8
mov byte [esp + 0x35], al
mov eax, dword [edi]
mov byte [esp + 0x36], al
mov eax, ecx
shr eax, 8
or al, 0x80
mov dword [esp + 0x30], 0x1909c3
cmp word [edi + 0x78], 1
mov byte [esp + 0x34], 0x3b
mov byte [esp + 0x37], al
mov byte [esp + 0x38], cl
jne 0x50fb35
mov ecx, dword [edi]
lea edx, [esp + 0x30]
push 9
call fcn.00526480
mov dl, byte [esp + 0x35]
add esp, 4
movzx eax, dl
mov ecx, edi
push eax
lea edx, [esp + 0x34]
call fcn.005264a0
mov eax, dword [esp + 0x2c]
add esp, 4
mov ecx, dword [esp + 0x24]
add esi, 0xc8
mov word [esp + ebx + 0x48], ax
add ebx, 2
mov dword [esp + 0x10], ecx
cmp esi, 0x320
jb 0x50fab4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
mov byte [esp + 0x4c], al
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x4d], al
mov al, byte [esp + 0x39]
mov byte [esp + 0x51], al
lea eax, [esp + 0x48]
push ebx
push eax
push ecx
mov byte [esp + 0x54], 0xc1
mov byte [esp + 0x55], bl
mov word [esp + 0x56], 0xabf
mov word [esp + 0x5a], cx
mov byte [esp + 0x5c], 3
call fcn.005192f0
xor esi, esi
mov eax, dword [edi + 0x368]
cmp byte [esi + eax], 0
je 0x50fbd6
cmp byte [esi + eax + 3], 1
jne 0x50fbd6
movsx ecx, word [esi + eax + 1]
lea edx, [esp + 0x48]
push ebx
call fcn.00526480
add esp, 4
add esi, 4
cmp esi, 0x12c
jl 0x50fbb1
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [esp + 0x14c]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret 0x10