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

Disassembly:
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
sub esp, 0xc0
push ebp
mov ebp, dword [esp + 0xcc]
push edi
mov edi, dword [esp + 0xd8]
push eax
push ecx
mov ecx, dword [esp + 0xec]
lea eax, [esp + 0x7c]
push edx
mov edx, dword [esp + 0xec]
push eax
push ecx
push edx
push ebp
push edi
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x50e1c6
pop edi
mov eax, 1
pop ebp
add esp, 0xc0
ret
mov edi, dword [edi + 8]
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x7c]
push ebx
push esi
mov esi, dword [esp + 0x90]
imul edi, edx
mov ebx, dword [esp + 0x80]
sub eax, esi
mov esi, dword [esp + 0x9c]
mov dword [esp + 0x4c], eax
sub esi, ecx
imul ecx, dword [esp + 0x20]
lea edi, [edi + ebx*4]
mov dword [esp + 0x5c], edx
add edi, dword [ebp + 4]
mov ebp, dword [esp + 0x90]
lea ecx, [ecx + ebp*4]
mov ebp, dword [esp + 0xe0]
add ecx, dword [ebp + 4]
cmp byte [esp + 0x7c], 0
mov dword [esp + 0x24], ecx
je 0x50e583
mov ebp, eax
mov edx, eax
sar ebp, 3
mov dword [esp + 0x64], ebp
mov ebp, dword [esp + 0x88]
and edx, 7
sub ebx, ebp
mov ebp, dword [esp + 0x5c]
add ebx, edx
mov dword [esp + 0x60], edx
lea ebx, [ebp + ebx*4]
mov dword [esp + 0x6c], ebx
mov ebx, edx
sub ebx, eax
mov eax, dword [esp + 0x20]
test esi, esi
lea eax, [eax + ebx*4]
mov dword [esp + 0x68], eax
jle 0x50e713
mov dword [esp + 0x5c], esi
mov ebx, 0xff
mov eax, dword [esp + 0x64]
test eax, eax
jle 0x50e4f7
mov esi, dword [esp + 0xe4]
lea ebp, [ecx + 8]
shl esi, 8
mov dword [esp + 0x20], eax
mov eax, dword [edi]
mov dword [esp + 0x10], eax
and eax, ebx
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x11]
and eax, ebx
mov byte [esp + 0x10], dl
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x12]
and eax, ebx
mov byte [esp + 0x11], dl
mov byte [esp + 0x13], bl
mov dl, byte [eax + esi + 0xa2ee04]
lea eax, [esp + 0x10]
push eax
mov byte [esp + 0x16], dl
call fcn.0050e720
mov eax, dword [edi + 4]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x19]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x18], cl
mov ecx, dword [esp + 0x1a]
and ecx, ebx
mov byte [esp + 0x19], al
lea eax, [esp + 0x18]
mov byte [esp + 0x1b], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp - 4]
mov byte [esp + 0x1e], dl
call fcn.0050e720
mov eax, dword [edi + 8]
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x3d]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x3c], cl
mov ecx, dword [esp + 0x3e]
and ecx, ebx
mov byte [esp + 0x3d], al
lea eax, [esp + 0x3c]
mov byte [esp + 0x3f], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
mov ecx, ebp
mov byte [esp + 0x42], dl
call fcn.0050e720
mov eax, dword [edi + 0xc]
mov dword [esp + 0x4c], eax
mov edx, dword [esp + 0x4d]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x4c], cl
mov ecx, dword [esp + 0x4e]
and ecx, ebx
mov byte [esp + 0x4d], al
lea eax, [esp + 0x4c]
mov byte [esp + 0x4f], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 4]
mov byte [esp + 0x52], dl
call fcn.0050e720
mov eax, dword [edi + 0x10]
mov dword [esp + 0x54], eax
mov edx, dword [esp + 0x55]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x54], cl
mov ecx, dword [esp + 0x56]
mov byte [esp + 0x55], al
and ecx, ebx
lea eax, [esp + 0x54]
push eax
mov byte [esp + 0x5b], bl
mov dl, byte [ecx + esi + 0xa2ee04]
lea ecx, [ebp + 8]
mov byte [esp + 0x5a], dl
call fcn.0050e720
mov eax, dword [edi + 0x14]
mov dword [esp + 0x44], eax
mov edx, dword [esp + 0x45]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x44], cl
mov ecx, dword [esp + 0x46]
and ecx, ebx
mov byte [esp + 0x45], al
lea eax, [esp + 0x44]
mov byte [esp + 0x47], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 0xc]
mov byte [esp + 0x4a], dl
call fcn.0050e720
mov eax, dword [edi + 0x18]
mov dword [esp + 0x34], eax
mov edx, dword [esp + 0x35]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x34], cl
mov ecx, dword [esp + 0x36]
and ecx, ebx
mov byte [esp + 0x35], al
lea eax, [esp + 0x34]
mov byte [esp + 0x37], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 0x10]
mov byte [esp + 0x3a], dl
call fcn.0050e720
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0x2d]
and eax, ebx
and edx, ebx
mov cl, byte [eax + esi + 0xa2ee04]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x2c], cl
mov ecx, dword [esp + 0x2e]
and ecx, ebx
mov byte [esp + 0x2d], al
lea eax, [esp + 0x2c]
mov byte [esp + 0x2f], bl
mov dl, byte [ecx + esi + 0xa2ee04]
push eax
lea ecx, [ebp + 0x14]
mov byte [esp + 0x32], dl
call fcn.0050e720
mov eax, dword [esp + 0x24]
add ebp, 0x20
add eax, 0x20
add edi, 0x20
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
dec eax
mov dword [esp + 0x20], eax
jne 0x50e29c
mov edx, dword [esp + 0x60]
test edx, edx
jle 0x50e557
mov ebp, edi
mov esi, ecx
sub ebp, ecx
mov dword [esp + 0x28], edx
mov ecx, dword [esi + ebp]
mov edx, dword [esp + 0xe4]
mov dword [esp + 0x70], ecx
push edx
lea ecx, [esp + 0x74]
call fcn.005003c0
mov ecx, dword [esp + 0x73]
mov eax, dword [esp + 0x70]
and ecx, ebx
mov dword [esp + 0x20], eax
push ecx
lea ecx, [esp + 0x24]
call fcn.004f8cc0
lea edx, [esp + 0x20]
mov ecx, esi
push edx
call fcn.00506890
mov eax, dword [esp + 0x28]
add esi, 4
dec eax
mov dword [esp + 0x28], eax
jne 0x50e505
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x60]
mov ebp, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
mov eax, dword [esp + 0x5c]
add ecx, ebp
add edi, esi
dec eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x5c], eax
jne 0x50e27f
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0xc0
ret
mov ebx, dword [esp + 0xbc]
imul edx, dword [esp + 0xcc]
shl ebx, 2
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0xb0]
mov dword [esp + 0x70], ebx
mov ebx, dword [esp + 0xb4]
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0xc4]
mov ebp, dword [esp + 0xc0]
mov dword [esp + 0x6c], ebx
mov ebx, dword [esp + 0xb8]
mov dword [esp + 0x54], edx
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0xc8]
test esi, esi
mov dword [esp + 0x78], ebx
jle 0x50e713
mov dword [esp + 0x64], esi
mov ebx, 0xff
jmp 0x50e5f2
mov ebp, dword [esp + 0x60]
add ebp, dword [esp + 0x6c]
mov dword [esp + 0x60], ebp
js 0x50e60c
mov esi, dword [esp + 0x5c]
add edi, esi
mov esi, dword [esp + 0x78]
sub ebp, esi
mov dword [esp + 0x60], ebp
mov esi, dword [esp + 0x70]
mov dword [esp + 0x3c], edi
test eax, eax
mov dword [esp + 0x28], esi
jle 0x50e6f3
mov esi, dword [esp + 0xe4]
mov ebp, ecx
shl esi, 8
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
add eax, ecx
mov dword [esp + 0x28], eax
js 0x50e64d
mov ecx, dword [esp + 0x34]
add edi, 4
sub eax, ecx
mov dword [esp + 0x28], eax
mov eax, dword [edi]
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x11]
and eax, ebx
and ecx, ebx
mov al, byte [eax + esi + 0xa2ee04]
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x10], al
mov eax, dword [esp + 0x12]
and eax, ebx
mov byte [esp + 0x13], bl
mov byte [esp + 0x11], dl
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x12], cl
mov eax, dword [esp + 0x12]
mov edx, dword [esp + 0x10]
and eax, ebx
mov dword [esp + 0x18], edx
mov cl, byte [eax + 0xa3ed04]
mov byte [esp + 0x1a], cl
mov edx, dword [esp + 0x19]
and edx, ebx
mov al, byte [edx + 0xa3ed04]
mov byte [esp + 0x19], al
mov ecx, dword [esp + 0x18]
and ecx, ebx
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x1f], 0
mov dl, byte [ecx + 0xa3ed04]
mov ecx, ebp
mov byte [esp + 0x1c], dl
call fcn.00506890
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x68]
add edi, edx
add ebp, 4
dec eax
mov dword [esp + 0x68], eax
jne 0x50e630
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x3c]
mov ebp, dword [esp + 0x20]
add ecx, ebp
lea edi, [esi + edx]
mov esi, dword [esp + 0x64]
dec esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x64], esi
jne 0x50e5ee
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0xc0
ret