Function at 0x5105d0
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 ebx
mov ebx, 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 ebx
push edi
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x510626
pop edi
mov eax, 1
pop ebx
add esp, 0xc0
ret
mov ecx, dword [edi + 8]
mov edi, dword [esp + 0x7c]
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x88]
push ebp
mov ebp, dword [ebx + 8]
imul edi, ebp
push esi
mov esi, dword [esp + 0x9c]
sub eax, edx
mov edx, dword [esp + 0x94]
sub esi, edx
mov dword [esp + 0x10], ecx
imul edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], ebp
lea edi, [edi + ecx*4]
add edi, dword [ebx + 4]
mov ebx, dword [esp + 0x90]
lea edx, [edx + ebx*4]
mov ebx, dword [esp + 0xe0]
add edx, dword [ebx + 4]
xor ebx, ebx
cmp byte [esp + 0x7c], bl
mov dword [esp + 0x14], edx
je 0x510a4f
mov ebp, eax
and ebp, 7
mov dword [esp + 0x18], ebp
mov ebp, eax
sar ebp, 3
mov dword [esp + 0x74], ebp
mov ebp, dword [esp + 0x88]
sub ecx, ebp
mov ebp, dword [esp + 0x18]
add ecx, ebp
mov ebp, dword [esp + 0x5c]
lea ecx, [ebp + ecx*4]
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0x18]
sub ecx, eax
mov eax, dword [esp + 0x10]
cmp esi, ebx
lea ecx, [eax + ecx*4]
mov dword [esp + 0x70], ecx
jle 0x510bdc
mov dword [esp + 0x5c], esi
mov eax, dword [esp + 0x74]
cmp eax, ebx
jle 0x5109a8
mov esi, dword [esp + 0xe4]
lea ebp, [edx + 8]
shl esi, 8
mov dword [esp + 0x10], eax
mov eax, dword [edi]
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 0x4d]
and eax, 0xff
and ecx, 0xff
mov al, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x4c], al
mov al, byte [ecx + esi + 0xa2ee04]
mov ecx, dword [esp + 0x4e]
mov byte [esp + 0x4d], al
and ecx, 0xff
mov byte [esp + 0x4f], bl
mov al, byte [ecx + esi + 0xa2ee04]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, edx
mov byte [esp + 0x52], al
call fcn.00510bf0
mov eax, dword [edi + 4]
mov dword [esp + 0x54], eax
and eax, 0xff
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x55]
and eax, 0xff
mov byte [esp + 0x54], dl
mov edx, dword [esp + 0x56]
mov byte [esp + 0x57], bl
mov cl, byte [eax + esi + 0xa2ee04]
and edx, 0xff
mov byte [esp + 0x55], cl
lea ecx, [esp + 0x54]
mov al, byte [edx + esi + 0xa2ee04]
push ecx
lea ecx, [ebp - 4]
mov byte [esp + 0x5a], al
call fcn.00510bf0
mov eax, dword [edi + 8]
mov dword [esp + 0x44], eax
and eax, 0xff
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x45]
and eax, 0xff
mov byte [esp + 0x44], dl
mov edx, dword [esp + 0x46]
mov byte [esp + 0x47], bl
mov cl, byte [eax + esi + 0xa2ee04]
and edx, 0xff
mov byte [esp + 0x45], cl
lea ecx, [esp + 0x44]
mov al, byte [edx + esi + 0xa2ee04]
push ecx
mov ecx, ebp
mov byte [esp + 0x4a], al
call fcn.00510bf0
mov eax, dword [edi + 0xc]
mov dword [esp + 0x34], eax
and eax, 0xff
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x35]
and eax, 0xff
mov byte [esp + 0x34], dl
mov edx, dword [esp + 0x36]
mov byte [esp + 0x37], bl
mov cl, byte [eax + esi + 0xa2ee04]
and edx, 0xff
mov byte [esp + 0x35], cl
lea ecx, [esp + 0x34]
mov al, byte [edx + esi + 0xa2ee04]
push ecx
lea ecx, [ebp + 4]
mov byte [esp + 0x3a], al
call fcn.00510bf0
mov eax, dword [edi + 0x10]
mov dword [esp + 0x2c], eax
and eax, 0xff
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x2d]
and eax, 0xff
mov byte [esp + 0x2c], dl
mov cl, byte [eax + esi + 0xa2ee04]
mov byte [esp + 0x2d], cl
mov edx, dword [esp + 0x2e]
lea ecx, [esp + 0x2c]
and edx, 0xff
push ecx
lea ecx, [ebp + 8]
mov byte [esp + 0x33], bl
mov al, byte [edx + esi + 0xa2ee04]
mov byte [esp + 0x32], al
call fcn.00510bf0
mov eax, dword [edi + 0x14]
mov dword [esp + 0x24], eax
and eax, 0xff
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x25]
and eax, 0xff
mov byte [esp + 0x24], dl
mov edx, dword [esp + 0x26]
mov byte [esp + 0x27], bl
mov cl, byte [eax + esi + 0xa2ee04]
and edx, 0xff
mov byte [esp + 0x25], cl
lea ecx, [esp + 0x24]
mov al, byte [edx + esi + 0xa2ee04]
push ecx
lea ecx, [ebp + 0xc]
mov byte [esp + 0x2a], al
call fcn.00510bf0
mov eax, dword [edi + 0x18]
mov dword [esp + 0x3c], eax
and eax, 0xff
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x3d]
and eax, 0xff
mov byte [esp + 0x3c], dl
mov edx, dword [esp + 0x3e]
mov byte [esp + 0x3f], bl
mov cl, byte [eax + esi + 0xa2ee04]
and edx, 0xff
mov byte [esp + 0x3d], cl
lea ecx, [esp + 0x3c]
mov al, byte [edx + esi + 0xa2ee04]
push ecx
lea ecx, [ebp + 0x10]
mov byte [esp + 0x42], al
call fcn.00510bf0
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x1c], eax
and eax, 0xff
mov dl, byte [eax + esi + 0xa2ee04]
mov eax, dword [esp + 0x1d]
and eax, 0xff
mov byte [esp + 0x1c], dl
mov edx, dword [esp + 0x1e]
mov byte [esp + 0x1f], bl
mov cl, byte [eax + esi + 0xa2ee04]
and edx, 0xff
mov byte [esp + 0x1d], cl
lea ecx, [esp + 0x1c]
mov al, byte [edx + esi + 0xa2ee04]
push ecx
lea ecx, [ebp + 0x14]
mov byte [esp + 0x22], al
call fcn.00510bf0
mov eax, dword [esp + 0x14]
add ebp, 0x20
add eax, 0x20
add edi, 0x20
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
dec eax
mov dword [esp + 0x10], eax
jne 0x5106fe
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
jle 0x510a23
mov eax, edi
mov esi, edx
sub eax, edx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x6c], eax
jmp 0x5109c4
mov eax, dword [esp + 0x6c]
mov edx, dword [eax + esi]
mov eax, dword [esp + 0xe4]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], edx
call fcn.004f92c0
mov ecx, dword [esi]
mov edx, dword [esp + 0x10]
mov eax, ecx
add esi, 4
not eax
mov ebp, eax
xor eax, edx
and ebp, edx
and eax, 0xfefefe
lea eax, [eax + ebp*2]
shr eax, 8
and eax, 0x10101
add eax, 0x7f7f7f
xor eax, 0x7f7f7f
mov ebp, eax
or eax, edx
or ebp, ecx
sub ebp, eax
mov eax, dword [esp + 0x60]
mov dword [esi - 4], ebp
dec eax
mov dword [esp + 0x60], eax
jne 0x5109c0
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x70]
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x5c]
add edx, esi
add edi, ecx
dec eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x5c], eax
jne 0x5106e1
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
add esp, 0xc0
ret
mov ecx, dword [esp + 0xbc]
shl ecx, 2
mov dword [esp + 0x34], ecx
mov ecx, ebp
mov ebp, dword [esp + 0xb0]
imul ecx, dword [esp + 0xcc]
mov dword [esp + 0x3c], ebp
mov ebp, dword [esp + 0xb4]
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0xc4]
mov dword [esp + 0x78], ebp
mov ebp, dword [esp + 0xb8]
mov dword [esp + 0x2c], ebp
mov ebp, dword [esp + 0xc8]
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0xc0]
cmp esi, ebx
mov dword [esp + 0x44], ecx
jle 0x510bdc
mov dword [esp + 0x74], esi
jmp 0x510abb
mov ebp, dword [esp + 0x60]
add ebp, dword [esp + 0x78]
mov dword [esp + 0x60], ebp
js 0x510ad5
mov esi, dword [esp + 0x5c]
add edi, esi
mov esi, dword [esp + 0x1c]
sub ebp, esi
mov dword [esp + 0x60], ebp
mov esi, dword [esp + 0x3c]
cmp eax, ebx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x18], esi
jle 0x510bbc
mov ecx, dword [esp + 0xe4]
mov esi, edx
shl ecx, 8
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
add eax, edx
mov dword [esp + 0x18], eax
js 0x510b1a
mov edx, dword [esp + 0x2c]
add edi, 4
sub eax, edx
mov dword [esp + 0x18], eax
mov eax, dword [edi]
mov esi, dword [esi]
mov dword [esp + 0x64], eax
and eax, 0xff
mov dl, byte [eax + ecx + 0xa2ee04]
mov eax, dword [esp + 0x65]
and eax, 0xff
mov byte [esp + 0x64], dl
mov dl, byte [eax + ecx + 0xa2ee04]
mov eax, dword [esp + 0x66]
and eax, 0xff
mov byte [esp + 0x65], dl
mov byte [esp + 0x67], bl
mov dl, byte [eax + ecx + 0xa2ee04]
mov eax, esi
mov byte [esp + 0x66], dl
mov edx, dword [esp + 0x64]
not eax
mov ebp, eax
xor eax, edx
and ebp, edx
and eax, 0xfefefe
lea eax, [eax + ebp*2]
shr eax, 8
and eax, 0x10101
add eax, 0x7f7f7f
xor eax, 0x7f7f7f
mov ebp, eax
or eax, edx
or ebp, esi
mov esi, dword [esp + 0x70]
sub ebp, eax
mov eax, dword [esp + 0x6c]
mov dword [esi], ebp
mov ebp, dword [esp + 0x34]
add edi, ebp
add esi, 4
dec eax
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], eax
jne 0x510afd
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x54]
mov esi, dword [esp + 0x4c]
mov ebp, dword [esp + 0x10]
add edx, ebp
lea edi, [esi + ecx]
mov esi, dword [esp + 0x74]
dec esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x74], esi
jne 0x510ab7
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
add esp, 0xc0
ret