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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, dword [ebx*4 + 0x20a514c]
mov dword [esp + 0x38], esi
cmp word [esi + 0x78], 1
je 0x50d78c
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [esi + 0x11c]
add eax, dword [esi + 0xf0]
cdq
idiv dword [0xbdbfc8]
push 0x164
mov edi, eax
mov eax, dword [esi + 0xf4]
add eax, dword [esi + 0x120]
cdq
idiv dword [0xbdbfcc]
add edi, dword [0xbdbfc4]
push esi
add edi, eax
call fcn.004b6100
add edi, eax
cmp edi, dword [0xbdbff4]
push 0x168
cmovg edi, dword [0xbdbff4]
push esi
call fcn.004b6100
push 0x16b
push esi
mov dword [esp + 0x54], eax
call fcn.004b6100
mov dword [esp + 0x48], eax
mov eax, dword [esi + 0xf4]
add eax, dword [esi + 0x120]
cdq
idiv dword [0xbdbff0]
mov ecx, dword [esi + 0x284]
add eax, dword [0xbdbfec]
mov dword [esp + 0x50], eax
test ecx, ecx
js 0x50dc7e
cmp ecx, 0x1194
jge 0x50dc7e
imul eax, ecx, 0x2c
mov ecx, 0xa
mov dword [esp + 0x34], ecx
add eax, 0xb94b0c
mov dword [esp + 0x44], eax
mov eax, dword [eax]
mov dword [esp + 0x54], eax
test eax, eax
js 0x50dc5b
cmp eax, 0x1194
jge 0x50dc5b
mov ebx, dword [eax*4 + 0x20a514c]
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], ebx
movzx esi, word [eax + 8]
movsx eax, word [ebx + 0x146]
push eax
movsx eax, word [ebx + 0x144]
push eax
movsx eax, word [ecx + 0x146]
push eax
movsx eax, word [ecx + 0x144]
push eax
push esi
call fcn.005080e0
test al, al
je 0x50dc57
cmp word [ebx + 0x78], 1
jne 0x50d8b4
movzx eax, word [ebx + 0xcc]
mov ecx, dword [eax*4 + 0xbdbfd0]
jmp 0x50d8b9
mov ecx, 0x64
imul ecx, edi
mov eax, 0x51eb851f
mov dword [esp + 0x40], esi
imul ecx
lea eax, [esp + 0x40]
mov ecx, 0xbf0bd4
sar edx, 5
mov edi, edx
push eax
shr edi, 0x1f
lea eax, [esp + 0x68]
add edi, edx
push eax
mov dword [esp + 0x1c], edi
call fcn.00405650
mov eax, dword [esp + 0x6c]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x50d8fe
cmp esi, dword [eax + 0x10]
jge 0x50d900
mov eax, ecx
cmp eax, ecx
je 0x50dc3f
mov ecx, dword [eax + 0x54]
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x50]
movzx eax, ax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x4c]
movzx esi, ax
mov dword [esp + 0x28], esi
movzx esi, di
mov dword [esp + 0x30], ecx
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], edx
test ecx, ecx
js 0x50dc3f
cmp ecx, 0x100
jge 0x50dc3f
imul eax, ecx, 0x4c
cmp dword [eax + 0x6460e4], ecx
lea edi, [eax + 0x6460e4]
jne 0x50dc3b
test edi, edi
je 0x50dc3b
mov eax, dword [edi + 0x38]
cmp eax, 0xffffffff
je 0x50d992
cmp dword [edi + 0x30], 2
jne 0x50d98c
push 0
call fcn.0052d9f5
mov dword [esp + 0x60], edx
add esp, 4
mov edx, dword [edi + 0x38]
add edx, eax
mov dword [esp + 0x18], edx
jmp 0x50d992
mov edx, eax
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x3c]
cmp eax, 0xffffffff
je 0x50d9a1
movzx eax, ax
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x40]
cmp eax, 0xffffffff
je 0x50d9b0
movzx eax, ax
mov dword [esp + 0x28], eax
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
je 0x50d9bf
movzx eax, ax
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0x48]
xor esi, esi
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, esi
mov esi, dword [ebx + 0x624]
movzx eax, cx
xor ecx, ecx
mov dword [esp + 0x3c], eax
movzx eax, ax
mov dword [esp + 0x40], eax
mov al, byte [esi + 4]
mov byte [esp + 0x10], al
cmp al, 0xff
je 0x50d9fb
movzx eax, byte [esi + 5]
cmp eax, dword [edi + 4]
je 0x50daa6
inc ecx
add esi, 0x1c
cmp ecx, 0x20
jl 0x50d9e3
mov eax, dword [esp + 0x20]
xor ebx, ebx
nop word [eax + eax]
mov esi, dword [eax + 0x624]
mov ecx, edx
mov al, byte [edi + 0x34]
add esi, ebx
mov byte [esp + 0x11], al
mov al, byte [edi + 0x30]
mov byte [esp + 0x10], al
cmp byte [esi + 4], 0xff
mov al, byte [edi + 0x2c]
mov byte [esp + 0x12], al
mov al, byte [edi + 4]
mov byte [esp + 0x13], al
mov eax, dword [esp + 0x20]
mov dword [esp + 0x3c], 0
jne 0x50da92
cmp byte [esp + 0x10], 2
jne 0x50dbc9
push 0
mov dword [esp + 0x40], edx
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push dword [esp + 0x24]
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x58]
movsd xmm0, qword [esp + 0x58]
call fcn.00546020
mov ecx, eax
test ecx, ecx
jg 0x50dbc9
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
add ebx, 0x1c
cmp ebx, 0x380
jl 0x50da10
jmp 0x50dc3b
movzx eax, byte [esp + 0x10]
cmp dword [esp + 0x30], eax
jne 0x50dae9
mov eax, dword [esp + 0x24]
cmp ax, word [esi + 0x14]
jb 0x50dc3b
mov eax, dword [esp + 0x28]
cmp ax, word [esi + 0x16]
jb 0x50dc3b
mov eax, dword [esp + 0x2c]
cmp ax, word [esi + 0x18]
jb 0x50dc3b
mov eax, dword [esp + 0x3c]
cmp ax, word [esi + 0x1a]
jb 0x50dc3b
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00478000
movzx eax, byte [esi + 4]
mov ecx, 0x6460e0
push eax
movzx eax, byte [esi + 5]
push 0
push 2
push 0
push eax
push ebx
call fcn.00478bb0
xor eax, eax
mov dword [esi + 4], 0xff
mov dword [esi + 0x10], 0
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov cl, byte [edi + 0x2c]
mov dl, byte [edi + 4]
mov dword [esp + 0x3c], eax
mov al, byte [edi + 0x34]
mov byte [esp + 0x13], al
mov al, byte [edi + 0x30]
mov byte [esp + 0x12], al
mov byte [esp + 0x11], cl
mov byte [esp + 0x10], dl
cmp al, 2
jne 0x50dbc3
mov ebx, dword [esp + 0x18]
push 0
mov dword [esp + 0x40], ebx
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push ebx
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x18]
movsd xmm0, qword [esp + 0x18]
call fcn.00546020
test eax, eax
jle 0x50dc3b
mov ebx, dword [esp + 0x20]
mov dl, byte [esp + 0x10]
mov dh, byte [esp + 0x11]
mov cl, byte [esp + 0x30]
mov edi, dword [esp + 0x3c]
mov byte [esi + 6], dh
mov dh, byte [esp + 0x12]
mov byte [esi + 7], dh
mov dh, byte [esp + 0x13]
push ecx
mov dword [esi + 0x10], eax
push eax
mov byte [esi + 4], cl
mov byte [esi + 5], dl
mov byte [esi + 8], dh
mov dword [esi + 0xc], edi
movzx eax, dl
jmp 0x50dbff
mov eax, dword [esp + 0x18]
jmp 0x50db93
mov dl, byte [esp + 0x12]
mov al, byte [esp + 0x30]
mov bl, byte [esp + 0x13]
mov byte [esi + 6], dl
mov dl, byte [esp + 0x10]
mov byte [esi + 7], dl
mov dl, byte [esp + 0x11]
push eax
mov byte [esi + 4], al
mov byte [esi + 8], dl
mov edx, dword [esp + 0x40]
mov byte [esi + 5], bl
movzx eax, bl
mov ebx, dword [esp + 0x24]
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ecx
push ecx
mov edi, dword [esp + 0x2c]
mov ecx, 0x6460e0
mov word [esi + 0x14], di
mov edi, dword [esp + 0x30]
push 0
mov word [esi + 0x16], di
mov edi, dword [esp + 0x38]
push 0
mov word [esi + 0x18], di
mov edi, dword [esp + 0x50]
push eax
push ebx
mov word [esi + 0x1a], di
call fcn.00478bb0
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00477580
mov edi, dword [esp + 0x14]
mov eax, dword [ebp + 0x10]
mov esi, dword [esp + 0x38]
push 1
push dword [esp + 0x58]
movzx eax, word [eax + 8]
push eax
push esi
call fcn.00517480
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x44]
add eax, 4
sub ecx, 1
mov dword [esp + 0x44], eax
mov dword [esp + 0x34], ecx
jne 0x50d840
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp word [esi + 0x78], 1
jne 0x50dc95
movzx eax, word [esi + 0xcc]
mov ecx, dword [eax*4 + 0xbdbfd0]
jmp 0x50dc9a
mov ecx, 0x64
imul ecx, edi
mov eax, 0x51eb851f
imul ecx
mov eax, dword [ebp + 0x10]
mov ecx, 0xbf0bd4
sar edx, 5
mov esi, edx
shr esi, 0x1f
movzx edi, word [eax + 8]
add esi, edx
lea eax, [esp + 0x54]
mov dword [esp + 0x54], edi
push eax
lea eax, [esp + 0x68]
push eax
call fcn.00405650
mov eax, dword [esp + 0x6c]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x50dce2
cmp edi, dword [eax + 0x10]
jge 0x50dce4
mov eax, ecx
cmp eax, ecx
jne 0x50dced
or eax, 0xffffffff
jmp 0x50dcf0
mov eax, dword [eax + 0x54]
push 0
push dword [esp + 0x4c]
push dword [esp + 0x54]
push esi
push dword [esp + 0x60]
mov esi, dword [esp + 0x4c]
push eax
push 0
push esi
call fcn.00477200
mov eax, dword [ebp + 0x10]
push 1
push ebx
movzx eax, word [eax + 8]
push eax
push esi
call fcn.00517480
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc