Function at 0x50daa0
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, 0xbc
push ebp
mov ebp, dword [esp + 0xc8]
push esi
mov esi, dword [esp + 0xd4]
push eax
push ecx
mov ecx, dword [esp + 0xe8]
lea eax, [esp + 0x78]
push edx
mov edx, dword [esp + 0xe8]
push eax
push ecx
push edx
push ebp
push esi
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x50daf6
pop esi
mov eax, 1
pop ebp
add esp, 0xbc
ret
mov eax, dword [esp + 0x8c]
mov edx, dword [ebp + 8]
push ebx
push edi
mov edi, dword [esp + 0x8c]
mov ecx, dword [esp + 0x98]
mov ebx, dword [esp + 0x90]
mov esi, dword [esi + 8]
sub eax, edi
mov edi, dword [esp + 0x80]
imul edi, edx
sub ecx, ebx
mov dword [esp + 0x20], esi
imul ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x5c], edx
lea edi, [edi + esi*4]
add edi, dword [ebp + 4]
mov ebp, dword [esp + 0x8c]
lea ebx, [ebx + ebp*4]
mov ebp, dword [esp + 0xdc]
add ebx, dword [ebp + 4]
cmp byte [esp + 0x78], 0
je 0x50df1c
mov ebp, eax
mov edx, eax
sar ebp, 3
mov dword [esp + 0x60], ebp
mov ebp, dword [esp + 0x84]
and edx, 7
sub esi, ebp
mov ebp, dword [esp + 0x5c]
add esi, edx
mov dword [esp + 0x54], edx
lea esi, [ebp + esi*4]
mov dword [esp + 0x68], esi
mov esi, edx
sub esi, eax
mov eax, dword [esp + 0x20]
test ecx, ecx
lea eax, [eax + esi*4]
mov dword [esp + 0x64], eax
jle 0x50e0be
mov dword [esp + 0x5c], ecx
mov eax, dword [esp + 0x60]
test eax, eax
jle 0x50de94
mov esi, dword [esp + 0xe0]
lea ebp, [ebx + 8]
shl esi, 8
mov dword [esp + 0x20], eax
mov ecx, dword [edi]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x12]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x12], al
mov ecx, dword [esp + 0x11]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x11], dl
mov eax, dword [esp + 0x10]
and eax, 0xff
lea edx, [esp + 0x10]
push edx
mov byte [esp + 0x17], 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x14], cl
mov ecx, ebx
call fcn.0050e0d0
mov eax, dword [edi + 4]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x1a]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x1a], dl
mov eax, dword [esp + 0x19]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x19], cl
mov edx, dword [esp + 0x18]
and edx, 0xff
lea ecx, [esp + 0x18]
push ecx
lea ecx, [ebp - 4]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x1f], 0xff
mov byte [esp + 0x1c], al
call fcn.0050e0d0
mov edx, dword [edi + 8]
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x4e]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x4e], cl
mov edx, dword [esp + 0x4d]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x4d], al
mov ecx, dword [esp + 0x4c]
and ecx, 0xff
lea eax, [esp + 0x4c]
push eax
mov byte [esp + 0x53], 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov ecx, ebp
mov byte [esp + 0x50], dl
call fcn.0050e0d0
mov ecx, dword [edi + 0xc]
mov dword [esp + 0x3c], ecx
mov edx, dword [esp + 0x3e]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x3e], al
mov ecx, dword [esp + 0x3d]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x3d], dl
mov eax, dword [esp + 0x3c]
and eax, 0xff
lea edx, [esp + 0x3c]
push edx
mov byte [esp + 0x43], 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x40], cl
lea ecx, [ebp + 4]
call fcn.0050e0d0
mov eax, dword [edi + 0x10]
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x2e]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x2e], dl
mov eax, dword [esp + 0x2d]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x2d], cl
mov edx, dword [esp + 0x2c]
and edx, 0xff
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [ebp + 8]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x33], 0xff
mov byte [esp + 0x30], al
call fcn.0050e0d0
mov edx, dword [edi + 0x14]
mov dword [esp + 0x44], edx
mov eax, dword [esp + 0x46]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x46], cl
mov edx, dword [esp + 0x45]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x45], al
mov ecx, dword [esp + 0x44]
and ecx, 0xff
lea eax, [esp + 0x44]
push eax
mov byte [esp + 0x4b], 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
lea ecx, [ebp + 0xc]
mov byte [esp + 0x48], dl
call fcn.0050e0d0
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x24], ecx
mov edx, dword [esp + 0x26]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x26], al
mov ecx, dword [esp + 0x25]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x25], dl
mov eax, dword [esp + 0x24]
and eax, 0xff
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0x2b], 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x28], cl
lea ecx, [ebp + 0x10]
call fcn.0050e0d0
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x36]
and ecx, 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov byte [esp + 0x36], dl
mov eax, dword [esp + 0x35]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x35], cl
mov edx, dword [esp + 0x34]
and edx, 0xff
lea ecx, [esp + 0x34]
push ecx
lea ecx, [ebp + 0x14]
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x3b], 0xff
mov byte [esp + 0x38], al
call fcn.0050e0d0
mov eax, dword [esp + 0x20]
add ebx, 0x20
add ebp, 0x20
add edi, 0x20
dec eax
mov dword [esp + 0x20], eax
jne 0x50dbc3
mov edx, dword [esp + 0x54]
test edx, edx
jle 0x50def4
mov ebp, edi
mov esi, ebx
sub ebp, ebx
mov dword [esp + 0x58], edx
mov eax, dword [esp + 0xe0]
mov edx, dword [esi + ebp]
push eax
lea ecx, [esp + 0x70]
mov dword [esp + 0x70], edx
call fcn.00500af0
mov edx, dword [esp + 0x6f]
mov ecx, dword [esp + 0x6c]
and edx, 0xff
mov dword [esp + 0x20], ecx
push edx
lea ecx, [esp + 0x24]
call fcn.004f8cc0
lea eax, [esp + 0x20]
mov ecx, esi
push eax
call fcn.00510bf0
mov eax, dword [esp + 0x58]
add esi, 4
dec eax
mov dword [esp + 0x58], eax
jne 0x50dea2
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x5c]
add ebx, esi
add edi, ecx
dec eax
mov dword [esp + 0x5c], eax
jne 0x50dba6
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0xbc
ret
mov esi, dword [esp + 0xb8]
imul edx, dword [esp + 0xc8]
shl esi, 2
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0xac]
mov dword [esp + 0x6c], esi
mov esi, dword [esp + 0xb0]
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0xc0]
mov dword [esp + 0x68], esi
mov esi, dword [esp + 0xb4]
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0xc4]
mov dword [esp + 0x74], esi
mov esi, dword [esp + 0xbc]
test ecx, ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x54], esi
jle 0x50e0be
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x68]
add ecx, esi
mov dword [esp + 0x54], ecx
js 0x50dfa4
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x74]
add edi, ebp
sub ecx, esi
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x4c], edi
test eax, eax
mov dword [esp + 0x58], ecx
jle 0x50e0a2
mov esi, dword [esp + 0xe0]
mov ebp, ebx
shl esi, 8
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x34]
add eax, ecx
mov dword [esp + 0x58], eax
js 0x50dfe5
mov ecx, dword [esp + 0x24]
add edi, 4
sub eax, ecx
mov dword [esp + 0x58], eax
mov edx, dword [edi]
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x12]
and eax, 0xff
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x12], cl
mov edx, dword [esp + 0x11]
and edx, 0xff
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x11], al
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov byte [esp + 0x13], 0xff
mov dl, byte [ecx + esi + 0xa2ee04]
mov ecx, dword [esp + 0x12]
and ecx, 0xff
mov byte [esp + 0x10], dl
mov eax, dword [esp + 0x10]
mov dl, byte [ecx + 0xa3ed04]
mov dword [esp + 0x18], eax
mov byte [esp + 0x1a], dl
mov eax, dword [esp + 0x19]
and eax, 0xff
mov cl, byte [eax + 0xa3ed04]
mov byte [esp + 0x19], cl
mov edx, dword [esp + 0x18]
and edx, 0xff
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebp
mov al, byte [edx + 0xa3ed04]
mov byte [esp + 0x1f], 0
mov byte [esp + 0x1c], al
call fcn.00510bf0
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x64]
add edi, edx
add ebp, 4
dec eax
mov dword [esp + 0x64], eax
jne 0x50dfc8
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x20]
add ebx, esi
lea edi, [ecx + edx]
mov ecx, dword [esp + 0x60]
dec ecx
mov dword [esp + 0x60], ecx
jne 0x50df84
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0xbc
ret